acerhdf thermal question

From: Daniel Lezcano
Date: Thu Feb 16 2023 - 03:57:52 EST



Hi,

the polling interval is specified and modified via a kernel module parameter [1]

The value is used to change the polling interval of the thermal zone, implying that is accessing the thermal zone device structure internals directly [2]

In real use case, is the interval changed at runtime? Or just when the module is loaded? If the latter, the interval can be passed to the thermal zone at init time without doing a polling change rate after the thermal zone started. In this case, we can remove the polling_delay_jiffies change in the code and fix the structure leakage in this driver.

Otherwise, I can add accessors to this field but I would like to prevent adding them if they are not really necessary.

Thanks
-- D.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/drivers/platform/x86/acerhdf.c?h=thermal/bleeding-edge#n792

[2] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/drivers/platform/x86/acerhdf.c?h=thermal/bleeding-edge#n359

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog