diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-29 18:25:59 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-08-13 20:53:18 +0200 |
commit | afd84fb10ced3caf53769ba734ea237bde0f69e3 (patch) | |
tree | cb33258a1904234c368665c9febcd5faf8c0e4c4 /drivers/input/joystick/fsia6b.c | |
parent | 66b263306a86c0f2d3cdb44e3722db6cff3a32b3 (diff) |
thermal: sysfs: Get to trips via attribute pointers
The _store() and _show() functions for sysfs attributes corresponding
to trip point parameters (type, temperature and hysteresis) read the
trip ID from the attribute name and then use the trip ID as the index
in the given thermal zone's trips table to get to the trip object they
want.
Instead of doing this, make them use the attribute pointer they get
as the second argument to get to the trip object embedded in the same
struct thermal_trip_desc as the struct device_attribute pointed to by
it, which is much more straightforward and less overhead.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/114841552.nniJfEyVGO@rjwysocki.net
Diffstat (limited to 'drivers/input/joystick/fsia6b.c')
0 files changed, 0 insertions, 0 deletions