On 2/1/24 05:27, Andrew Lunn wrote:
+#ifdef CONFIG_HWMON
HWMON is tristate, so this may be problematic if the driver is built
into the kernel and hwmon is built as module.
There should be Kconfig in addition to this, e.g.
config MAXLINEAR_GPHY
tristate "Maxlinear Ethernet PHYs"
select POLYNOMIAL if HWMON
depends on HWMON || HWMON=n
help
Support for the Maxlinear GPY115, GPY211, GPY212, GPY215,
GPY241, GPY245 PHYs.
So its forced to being built in, or not built at all.
Even then it should be "#if IS_ENABLED(HWMON)" in the code.
Thanks,
Guenter