]> git.baikalelectronics.ru Git - kernel.git/commit
net: smc91x: Fix build without gpiolib
authorTobias Klauser <tklauser@distanz.ch>
Mon, 15 Dec 2014 09:02:27 +0000 (10:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Dec 2014 16:46:54 +0000 (11:46 -0500)
commitadefa3bdbcc735ffc46cc801948810c06999561b
treea18b54ac417fb40126d3d8b5425bffc0acfc87d5
parentfa4203a92dfb9b48f383dd4bad7c1c9cdc175a0f
net: smc91x: Fix build without gpiolib

If GPIOLIB=n the following build errors occur:

drivers/net/ethernet/smsc/smc91x.c: In function 'try_toggle_control_gpio':
drivers/net/ethernet/smsc/smc91x.c:2204:2: error: implicit declaration of function 'devm_gpiod_get_index' [-Werror=implicit-function-declaration]
drivers/net/ethernet/smsc/smc91x.c:2204:7: warning: assignment makes pointer from integer without a cast [enabled by default]
drivers/net/ethernet/smsc/smc91x.c:2213:2: error: implicit declaration of function 'gpiod_direction_output' [-Werror=implicit-function-declaration]
drivers/net/ethernet/smsc/smc91x.c:2216:3: error: implicit declaration of function 'devm_gpiod_put' [-Werror=implicit-function-declaration]
drivers/net/ethernet/smsc/smc91x.c:2222:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]

Fix this by letting the driver depend on GPIOLIB if OF is selected.

Fixes: 513695fc8fc ("net: smc91x: Fix gpios for device tree based booting")
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/Kconfig