]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Handle not having GPIO enabled in the kernel
authorAndrew Lunn <andrew@lunn.ch>
Mon, 5 Feb 2018 18:17:23 +0000 (19:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Feb 2018 16:20:17 +0000 (11:20 -0500)
commite6ea383e42257b66824a5c0cdde55757d63d332a
treeaead710a26cc179767e37c946c729ebf7e1cb955
parent8fbaf5709234f06024a509a44a8fafdd3aa796c5
net: phy: Handle not having GPIO enabled in the kernel

If CONFIG_GPIOLIB is disabled, fwnode_get_named_gpiod() becomes a stub
function, which return -ENOSYS. Handle this in the same way as
-ENOENT, i.e. assume there is no GPIO used to reset the PHYs.

Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: 00f9672ff203 ("phylib: Add device reset GPIO support")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c