mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
The devres variant of thermal_add_hwmon_sysfs() only takes the thermal zone structure pointer as parameter. Actually, it uses the tz->device to add it in the devres list. It is preferable to use the device registering the thermal zone instead of the thermal zone device itself. That prevents the driver accessing the thermal zone structure internals and it is from my POV more correct regarding how devm_ is used. Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Martin Blumenstingl <[email protected]> #amlogic_thermal Acked-by: Jernej Skrabec <[email protected]> #sun8i_thermal Reviewed-by: AngeloGioacchino Del Regno <[email protected]> #MediaTek auxadc Signed-off-by: Rafael J. Wysocki <[email protected]>