Commit b659a30d authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Zhang Rui

thermal: core: remove style warnings and checks

Removing several style issues in thermal code code.

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 2a0b4c44
...@@ -718,10 +718,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, ...@@ -718,10 +718,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
mutex_lock(&tz->lock); mutex_lock(&tz->lock);
mutex_lock(&cdev->lock); mutex_lock(&cdev->lock);
list_for_each_entry(pos, &tz->thermal_instances, tz_node) list_for_each_entry(pos, &tz->thermal_instances, tz_node)
if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) {
result = -EEXIST; result = -EEXIST;
break; break;
} }
if (!result) { if (!result) {
list_add_tail(&dev->tz_node, &tz->thermal_instances); list_add_tail(&dev->tz_node, &tz->thermal_instances);
list_add_tail(&dev->cdev_node, &cdev->thermal_instances); list_add_tail(&dev->cdev_node, &cdev->thermal_instances);
...@@ -801,8 +801,8 @@ static void thermal_release(struct device *dev) ...@@ -801,8 +801,8 @@ static void thermal_release(struct device *dev)
sizeof("thermal_zone") - 1)) { sizeof("thermal_zone") - 1)) {
tz = to_thermal_zone(dev); tz = to_thermal_zone(dev);
kfree(tz); kfree(tz);
} else if(!strncmp(dev_name(dev), "cooling_device", } else if (!strncmp(dev_name(dev), "cooling_device",
sizeof("cooling_device") - 1)) { sizeof("cooling_device") - 1)) {
cdev = to_cooling_device(dev); cdev = to_cooling_device(dev);
kfree(cdev); kfree(cdev);
} }
...@@ -1036,8 +1036,8 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) ...@@ -1036,8 +1036,8 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
mutex_lock(&thermal_list_lock); mutex_lock(&thermal_list_lock);
list_for_each_entry(pos, &thermal_cdev_list, node) list_for_each_entry(pos, &thermal_cdev_list, node)
if (pos == cdev) if (pos == cdev)
break; break;
if (pos != cdev) { if (pos != cdev) {
/* thermal cooling device not found */ /* thermal cooling device not found */
mutex_unlock(&thermal_list_lock); mutex_unlock(&thermal_list_lock);
...@@ -1241,7 +1241,7 @@ thermal_zone_device_register(const char *type, int trips, int mask, ...@@ -1241,7 +1241,7 @@ thermal_zone_device_register(const char *type, int trips, int mask,
/* Bind cooling devices for this zone */ /* Bind cooling devices for this zone */
bind_tz(tz); bind_tz(tz);
INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check);
thermal_zone_device_reset(tz); thermal_zone_device_reset(tz);
/* Update the new thermal zone and mark it as already updated. */ /* Update the new thermal zone and mark it as already updated. */
...@@ -1275,8 +1275,8 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) ...@@ -1275,8 +1275,8 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
mutex_lock(&thermal_list_lock); mutex_lock(&thermal_list_lock);
list_for_each_entry(pos, &thermal_tz_list, node) list_for_each_entry(pos, &thermal_tz_list, node)
if (pos == tz) if (pos == tz)
break; break;
if (pos != tz) { if (pos != tz) {
/* thermal zone device not found */ /* thermal zone device not found */
mutex_unlock(&thermal_list_lock); mutex_unlock(&thermal_list_lock);
......
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