thermal: sysfs: Rework the reading of trip point attributes
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Dec 2023 12:26:59 +0000 (13:26 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 6 Dec 2023 20:29:52 +0000 (21:29 +0100)
commit18dfb0e4c3c3cd5654182833bcf3dfdcef754e6e
treea6b563483f35c102c8fcf4044b9dd98c756bda0a
parentbe0a3600aa1ebe9d23243c91d41ab1a2d5091a9b
thermal: sysfs: Rework the reading of trip point attributes

Rework the _show() callback functions for the trip point temperature,
hysteresis and type attributes to avoid copying the values of struct
thermal_trip fields that they do not use and make them carry out the
same validation checks as the corresponding _store() callback functions.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_sysfs.c