Message ID | 7607130.s0M7SSqlJV@wuerfel |
---|---|
State | New |
Headers | show |
On Fri, Jan 08, 2016 at 09:06:43PM +0100, Arnd Bergmann wrote: > I've run into the same problem a couple of times now, with every driver > that calls thermal_zone_of_sensor_register(). I think we need a better > solution in general, but this fixes the immediate build error for now. Yes, this doesn't feel very clever especially in this use case where we're mostly providing data into the thermal framework and not really relying on it for anything. > Maybe we should replace the "#ifdef CONFIG_THERMAL_OF" with "#if > IS_REACHABLE(CONFIG_THERMAL) && IS_ENABLED(CONFIG_THERMAL_OF)"? > The disadvantage of that is that the thermal management would be > silently disabled rather than cause a link error, and that may also > not be desired. Perhaps we should ensure that at least some glue code is bool rather than modular? That's got downsides too, it increases the amount of code that gets built into the kernel but perhaps that's an acceptable tradeoff here.
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 8155e80dd3f8..7df9da82f592 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -383,6 +383,7 @@ config REGULATOR_MAX8952 config REGULATOR_MAX8973 tristate "Maxim MAX8973 voltage regulator " depends on I2C + depends on THERMAL || !THERMAL_OF select REGMAP_I2C help The MAXIM MAX8973 high-efficiency. three phase, DC-DC step-down