diff options
author | Niklas Cassel <niklas.cassel@linaro.org> | 2018-10-31 18:08:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-04 16:50:51 +0300 |
commit | b4f003cb48d56dcc7fad28f76ea051f4949b22e4 (patch) | |
tree | c402c20201db09c64b9b2ea12a1bc2081ee112b7 /net/ipv4/udp.c | |
parent | 917629e6e2f60c391d1a9dbd9188f35d8703840c (diff) | |
download | linux-b4f003cb48d56dcc7fad28f76ea051f4949b22e4.tar.xz |
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
[ Upstream commit 30549aab146ccb1275230c3b4b4bc6b4181fd54e ]
When building stmmac, it is only possible to select CONFIG_DWMAC_GENERIC,
or any of the glue drivers, when CONFIG_STMMAC_PLATFORM is set.
The only exception is CONFIG_STMMAC_PCI.
When calling of_mdiobus_register(), it will call our ->reset()
callback, which is set to stmmac_mdio_reset().
Most of the code in stmmac_mdio_reset() is protected by a
"#if defined(CONFIG_STMMAC_PLATFORM)", which will evaluate
to false when CONFIG_STMMAC_PLATFORM=m.
Because of this, the phy reset gpio will only be pulled when
stmmac is built as built-in, but not when built as modules.
Fix this by using "#if IS_ENABLED()" instead of "#if defined()".
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/udp.c')
0 files changed, 0 insertions, 0 deletions