diff options
author | Daniel Lezcano <[email protected]> | 2023-03-01 21:14:36 +0100 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2023-03-03 20:45:02 +0100 |
commit | 4a16c190f761cb3a87dcbbf355f91c71ce1f8c0b (patch) | |
tree | e43ca75ccef305b6c8bc2bbdd3eb65fe0b9890dc /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 8f3f4ad4ad45e2e30c814de42629ef4c9688e92c (diff) |
thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
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]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions