diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-01-27 21:17:03 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-02-02 17:26:45 +0300 |
commit | dd3b3d160ea7004091051da60e86f36f40970888 (patch) | |
tree | 43a6e5c08142b92c016561fa59839d66e2013234 /include/linux/thermal.h | |
parent | f4118dbe61bb30038ca7f3ecaf333cabc9c54141 (diff) | |
download | linux-dd3b3d160ea7004091051da60e86f36f40970888.tar.xz |
thermal: ACPI: Make helpers retrieve temperature only
It is slightly better to make the ACPI thermal helper functions retrieve
the trip point temperature only instead of doing the full trip point
initialization, because they are also used for updating some already
registered trip points, in which case initializing a new trip just
in order to update the temperature of an existing one is somewhat
wasteful.
Modify the ACPI thermal helpers accordingly and update their users.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 23c2617156b5..2bb4bf33f4f3 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -347,11 +347,10 @@ int thermal_zone_get_num_trips(struct thermal_zone_device *tz); int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); #ifdef CONFIG_THERMAL_ACPI -int thermal_acpi_trip_active(struct acpi_device *adev, int id, - struct thermal_trip *trip); -int thermal_acpi_trip_passive(struct acpi_device *adev, struct thermal_trip *trip); -int thermal_acpi_trip_hot(struct acpi_device *adev, struct thermal_trip *trip); -int thermal_acpi_trip_critical(struct acpi_device *adev, struct thermal_trip *trip); +int thermal_acpi_active_trip_temp(struct acpi_device *adev, int id, int *ret_temp); +int thermal_acpi_passive_trip_temp(struct acpi_device *adev, int *ret_temp); +int thermal_acpi_hot_trip_temp(struct acpi_device *adev, int *ret_temp); +int thermal_acpi_critical_trip_temp(struct acpi_device *adev, int *ret_temp); #endif #ifdef CONFIG_THERMAL |