From 8d1bbb59504c8ecda86d09e9834cc33f31c8d326 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 31 Jan 2020 15:45:13 +0000 Subject: net: sfp: clean up sfp-bus building Use a Kconfig symbol to control the build of sfp-bus.c Signed-off-by: Russell King --- drivers/net/phy/Kconfig | 4 ++++ drivers/net/phy/Makefile | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 9e2672800f0b..8ac5a4fb1181 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -68,11 +68,15 @@ config RUST_PHYLIB_ABSTRACTIONS Adds support needed for PHY drivers written in Rust. It provides a wrapper around the C phylib core. +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 dc4c583f7e00..355ecd213761 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -29,8 +29,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_ADIN1100_PHY) += adin1100.o -- cgit