Commit 77dc4f90 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Zhang Rui

thermal: core: remove a couple of style issues on helpers

Reorganizing the code of helper functions to improve
readability and style, as recommended by checkpatch.pl.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 45cf2ec9
...@@ -248,8 +248,9 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip) ...@@ -248,8 +248,9 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
} }
EXPORT_SYMBOL(get_tz_trend); EXPORT_SYMBOL(get_tz_trend);
struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz, struct thermal_instance *
struct thermal_cooling_device *cdev, int trip) get_thermal_instance(struct thermal_zone_device *tz,
struct thermal_cooling_device *cdev, int trip)
{ {
struct thermal_instance *pos = NULL; struct thermal_instance *pos = NULL;
struct thermal_instance *target_instance = NULL; struct thermal_instance *target_instance = NULL;
...@@ -513,7 +514,7 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) ...@@ -513,7 +514,7 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
if (!ret && *temp < crit_temp) if (!ret && *temp < crit_temp)
*temp = tz->emul_temperature; *temp = tz->emul_temperature;
} }
mutex_unlock(&tz->lock); mutex_unlock(&tz->lock);
exit: exit:
return ret; return ret;
...@@ -1192,7 +1193,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev) ...@@ -1192,7 +1193,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
/* Make sure cdev enters the deepest cooling state */ /* Make sure cdev enters the deepest cooling state */
list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) { list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
dev_dbg(&cdev->device, "zone%d->target=%lu\n", dev_dbg(&cdev->device, "zone%d->target=%lu\n",
instance->tz->id, instance->target); instance->tz->id, instance->target);
if (instance->target == THERMAL_NO_TARGET) if (instance->target == THERMAL_NO_TARGET)
continue; continue;
if (instance->target > target) if (instance->target > target)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment