summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-01-31 15:45:13 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-06-21 10:58:21 +0100
commit736c7e91d64742330f3c864b4ae0c91a24674f17 (patch)
treee110363bb9acc55d9cb6fb939779047c0d4395c4 /drivers
parent6e8843c2426b2b26a2b3f4d0a5676e13bddc249b (diff)
net: sfp: clean up sfp-bus building
Use a Kconfig symbol to control the build of sfp-bus.c Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/Kconfig4
-rw-r--r--drivers/net/phy/Makefile3
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index ea7571a2b39b..27abb71f1ca5 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -55,11 +55,15 @@ config FIXED_PHY
Currently tested with mpc866ads and mpc8349e-mitx.
+config SFP_BUS
+ bool
+
config SFP
tristate "SFP cage support"
depends on I2C && PHYLINK
depends on HWMON || HWMON=n
select MDIO_I2C
+ select SFP_BUS
comment "MII PHY device drivers"
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 48733fb58dcb..08ba7c745f7f 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -27,8 +27,7 @@ obj-$(CONFIG_PHYLIB) += libphy.o
obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += mii_timestamper.o
obj-$(CONFIG_SFP) += sff.o sfp.o
-sfp-obj-$(CONFIG_SFP) += sfp-bus.o
-obj-y += $(sfp-obj-y) $(sfp-obj-m)
+obj-$(CONFIG_SFP_BUS) += sfp-bus.o
obj-$(CONFIG_ADIN_PHY) += adin.o
obj-$(CONFIG_AMD_PHY) += amd.o