diff options
author | 2023-09-22 13:25:13 -0700 | |
---|---|---|
committer | 2023-09-22 13:25:13 -0700 | |
commit | 8018e02a87031a5e8afcbd9d35133edd520076bb (patch) | |
tree | eb808dd7ed81a67209525447a8fce81023923df4 /drivers | |
parent | Merge tag 'acpi-6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/raf... (diff) | |
parent | thermal: sysfs: Fix trip_point_hyst_store() (diff) | |
download | linux-8018e02a87031a5e8afcbd9d35133edd520076bb.tar.gz linux-8018e02a87031a5e8afcbd9d35133edd520076bb.tar.bz2 linux-8018e02a87031a5e8afcbd9d35133edd520076bb.zip |
Merge tag 'thermal-6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fix from Rafael Wysocki:
"Unbreak the trip point update sysfs interface that has been broken
since the 6.3 cycle (Rafael Wysocki)"
* tag 'thermal-6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
thermal: sysfs: Fix trip_point_hyst_store()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/thermal/thermal_sysfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 6c20c9f90a05..4e6a97db894e 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -185,9 +185,6 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr, if (sscanf(attr->attr.name, "trip_point_%d_hyst", &trip_id) != 1) return -EINVAL; - if (kstrtoint(buf, 10, &trip.hysteresis)) - return -EINVAL; - mutex_lock(&tz->lock); if (!device_is_registered(dev)) { @@ -198,7 +195,11 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr, ret = __thermal_zone_get_trip(tz, trip_id, &trip); if (ret) goto unlock; - + + ret = kstrtoint(buf, 10, &trip.hysteresis); + if (ret) + goto unlock; + ret = thermal_zone_set_trip(tz, trip_id, &trip); unlock: mutex_unlock(&tz->lock); |