summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorShih-Yuan Lee <fourdollars@debian.org>2026-07-11 17:33:23 +0800
committerGuenter Roeck <linux@roeck-us.net>2026-08-10 08:59:41 -0700
commit94f5081d359265985587b5c96797ca919253f480 (patch)
treefcca4f397c8cecb6b638369986542aa90cffc67a /tools/perf/scripts/python/bin/stackcollapse-record
parent5a151274c1fd8696ddc7e9a84906a67ab0df66e8 (diff)
hwmon: (applesmc) Convert to hwmon_device_register_with_info
The legacy hwmon_device_register() function is deprecated and triggers warnings in dmesg. Convert the driver to the modern hwmon_device_register_with_info() API. This conversion does the following: - Dynamically allocates standard HWMON temp, fan, and pwm channels. - Configures HWMON ops callbacks (.is_visible, .read, .read_string, .write). - Standardizes attribute naming to match the HWMON ABI: - fanX_output -> fanX_target (HWMON_F_TARGET) - fanX_manual -> pwmX_enable (HWMON_PWM_ENABLE) - Dynamically registers non-standard fanX_safe attributes under the HWMON class directory via extra_groups. - Cleans up legacy sysfs nodes, groups, and unused show/store static functions to avoid unused symbol compiler warnings. - Avoids recursive mutex deadlocks when writing to pwmX_enable by locklessly resolving the entry and invoking the underlying raw SMC read/write calls. - Avoids UAF race condition on module exit by using unmanaged registration and explicitly calling hwmon_device_unregister() as the first step of applesmc_exit(), guaranteeing that HWMON nodes are destroyed before static structures are freed. Signed-off-by: Shih-Yuan Lee <fourdollars@debian.org> Link: https://lore.kernel.org/r/20260711093323.14529-4-fourdollars@debian.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions