net: phy: Fix modular PHYLIB build
Subsystems (3)
PATCH 1/1 net: phy: Fix modular PHYLIB build
After commit c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers") we made net/core/ethtool.c reference symbols which are part of the library which can be modular. David introduced a temporary fix with 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.") which would prevent such modularity.
This is not desireable of course, so instead, just inline the functions into include/linux/phy.h to keep both options available.
--- drivers/net/phy/Kconfig | 3 ++- drivers/net/phy/phy.c | 48 ----------------------------------------------- include/linux/phy.h | 50 +++++++++++++++++++++++++++++++++++++------------ 3 files changed, 40 insertions(+), 61 deletions(-)
drivers/net/phy/Kconfig +2 -1
@@ -9,6 +9,7 @@ menuconfig MDIO_DEVICE config MDIO_BUS tristate + default m if PHYLIB=m default MDIO_DEVICE help This internal symbol is used for link time dependencies and it
@@ -170,7 +171,7 @@ config PHYLINK autonegotiation modes. menuconfig PHYLIB - bool "PHY Device support and infrastructure" + tristate "PHY Device support and infrastructure" depends on NETDEVICES select MDIO_DEVICE help
drivers/net/phy/phy.c +0 -48
51 lines not on this page · raw message
include/linux/phy.h +38 -12
65 lines not on this page · raw message
Signature · 1 line
2.14.1
Quoted 6 lines · Florian Fainelli
After commit
c59530d0d5dc("net: Move PHY statistics code into PHY library helpers") we madenet/core/ethtool.creference symbols which are part of the library which can be modular. David introduced a temporary fix with1ecd6e8ad996("phy: Temporary build fix after phylib changes.") which would prevent such modularity.
Quoted 6 lines
This is not desireable of course, so instead, just inline the functions into
include/linux/phy.hto keep both options available.Fixes c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers")Fixes 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.")Signed-off-by Florian Fainelli <[email protected]>
Confirmed that this also fixes the build when CONFIG_PHYLIB is off. Thanks.
From: Florian Fainelli <[email protected]>
Date: Fri, 27 Apr 2018 12:41:49 -0700
Quoted 6 lines
After commit
c59530d0d5dc("net: Move PHY statistics code into PHY library helpers") we madenet/core/ethtool.creference symbols which are part of the library which can be modular. David introduced a temporary fix with1ecd6e8ad996("phy: Temporary build fix after phylib changes.") which would prevent such modularity.
Quoted 6 lines
This is not desireable of course, so instead, just inline the functions into
include/linux/phy.hto keep both options available.Fixes c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers")Fixes 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.")Signed-off-by Florian Fainelli <[email protected]>
Applied, thanks Florian.