From 45c6ead099854613bb7c490d5f7fa56ec71b06ee Mon Sep 17 00:00:00 2001 From: Johann Fischer Date: Tue, 5 Mar 2019 16:38:51 +0100 Subject: [PATCH] drivers: eth_enc28j60: fix typo and build for half duplex Fix typo and build for half duplex configuration. Signed-off-by: Johann Fischer --- drivers/ethernet/Kconfig.enc28j60 | 4 ++-- drivers/ethernet/eth_enc28j60.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ethernet/Kconfig.enc28j60 b/drivers/ethernet/Kconfig.enc28j60 index 5eba21fdfd..9e477cc4b3 100644 --- a/drivers/ethernet/Kconfig.enc28j60 +++ b/drivers/ethernet/Kconfig.enc28j60 @@ -29,7 +29,7 @@ config ETH_ENC28J60_RX_THREAD_PRIO Priority level for internal thread which is ran for incoming packet processing. -config ETH_EN28J60_TIMEOUT +config ETH_ENC28J60_TIMEOUT int "IP buffer timeout" depends on ETH_ENC28J60 default 100 @@ -45,7 +45,7 @@ config ETH_ENC28J60_0 Include port 0 driver if ETH_ENC28J60 && ETH_ENC28J60_0 -config ETH_EN28J60_0_FULL_DUPLEX +config ETH_ENC28J60_0_FULL_DUPLEX bool "ENC28J60 full duplex" default y help diff --git a/drivers/ethernet/eth_enc28j60.c b/drivers/ethernet/eth_enc28j60.c index f00853f9cf..909ea57d82 100644 --- a/drivers/ethernet/eth_enc28j60.c +++ b/drivers/ethernet/eth_enc28j60.c @@ -767,8 +767,8 @@ static const struct eth_enc28j60_config eth_enc28j60_0_config = { .spi_cs_port = DT_MICROCHIP_ENC28J60_0_CS_GPIO_CONTROLLER, .spi_cs_pin = DT_MICROCHIP_ENC28J60_0_CS_GPIO_PIN, #endif /* CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS */ - .full_duplex = CONFIG_ETH_EN28J60_0_FULL_DUPLEX, - .timeout = CONFIG_ETH_EN28J60_TIMEOUT, + .full_duplex = IS_ENABLED(CONFIG_ETH_ENC28J60_0_FULL_DUPLEX), + .timeout = CONFIG_ETH_ENC28J60_TIMEOUT, }; NET_DEVICE_INIT(enc28j60_0, DT_MICROCHIP_ENC28J60_0_LABEL,