Commit b5293443 authored by Guenter Roeck's avatar Guenter Roeck Committed by David S. Miller

net: phy: sfp: Do not use "imply HWMON"

"imply HWMON" was supposed to ensure that the SFP phy code can be built
with HWMON enabled or disabled while at the same time ensuring that
HWMON is not built as module if SFP is built into the kernel.
Unfortunately, that does not work as intended. With "allmodconfig", it
results in several unrelated HWMON drivers to be disabled instead of
being built as module as expected.

Let's use the old "depends on HWMON || HWMON=n" instead. This is slightly
different (it enforces SFP to be built as module if HWMON is built as
module), but it is better than the alternative of using "IS_REACHABLE()"
in the driver since that would disable sensor support if HWMON is built
as module and SFP is built into the kernel.

Fixes: 1323061a ("net: phy: sfp: Add HWMON support for module sensors")
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c303373
...@@ -214,8 +214,8 @@ comment "MII PHY device drivers" ...@@ -214,8 +214,8 @@ comment "MII PHY device drivers"
config SFP config SFP
tristate "SFP cage support" tristate "SFP cage support"
depends on I2C && PHYLINK depends on I2C && PHYLINK
depends on HWMON || HWMON=n
select MDIO_I2C select MDIO_I2C
imply HWMON
config AMD_PHY config AMD_PHY
tristate "AMD PHYs" tristate "AMD PHYs"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment