From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: [PATCH] net: ti: cpsw: include gpio/consumer.h Date: Wed, 30 May 2018 23:51:54 +0200 Message-ID: <20180530215212.1151415-1-arnd@arndb.de> Cc: linux-gpio@vger.kernel.org, Florian Fainelli , Arnd Bergmann , Ivan Khoronzhuk , Keerthy , linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: "David S. Miller" , Grygorii Strashko Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On platforms that don't always enable CONFIG_GPIOLIB, we run into a build failure: drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_probe': drivers/net/ethernet/ti/cpsw.c:3006:9: error: implicit declaration of function 'devm_gpiod_get_array_optional' [-Werror=implicit-function-declaration] mode = devm_gpiod_get_array_optional(&pdev->dev, "mode", GPIOD_OUT_LOW); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/ti/cpsw.c:3006:59: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'? mode = devm_gpiod_get_array_optional(&pdev->dev, "mode", GPIOD_OUT_LOW); Since we cannot rely on this to be visible from gpio.h, we have to include gpio/consumer.h directly. Fixes: 2652113ff043 ("net: ethernet: ti: Allow most drivers with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 643cd2d9dfb6..534596ce00d3 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include -- 2.9.0