diff options
author | Eduardo Valentin <edubezval@gmail.com> | 2016-11-08 00:09:23 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2016-11-22 21:06:12 -0500 |
commit | b659a30d7bdd5d9aa0d36b0215bfe3f9961ddf78 (patch) | |
tree | 711f82b328e085f285e577de152c2456aacc8d98 /drivers/thermal | |
parent | 2a0b4c44ce345f5ea8c240d7d3317974301032cd (diff) |
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: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_core.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 8365d0b81f77..e3cdba530418 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
@@ -718,10 +718,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | |||
718 | mutex_lock(&tz->lock); | 718 | mutex_lock(&tz->lock); |
719 | mutex_lock(&cdev->lock); | 719 | mutex_lock(&cdev->lock); |
720 | list_for_each_entry(pos, &tz->thermal_instances, tz_node) | 720 | list_for_each_entry(pos, &tz->thermal_instances, tz_node) |
721 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { | 721 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { |
722 | result = -EEXIST; | 722 | result = -EEXIST; |
723 | break; | 723 | break; |
724 | } | 724 | } |
725 | if (!result) { | 725 | if (!result) { |
726 | list_add_tail(&dev->tz_node, &tz->thermal_instances); | 726 | list_add_tail(&dev->tz_node, &tz->thermal_instances); |
727 | list_add_tail(&dev->cdev_node, &cdev->thermal_instances); | 727 | list_add_tail(&dev->cdev_node, &cdev->thermal_instances); |
@@ -801,8 +801,8 @@ static void thermal_release(struct device *dev) | |||
801 | sizeof("thermal_zone") - 1)) { | 801 | sizeof("thermal_zone") - 1)) { |
802 | tz = to_thermal_zone(dev); | 802 | tz = to_thermal_zone(dev); |
803 | kfree(tz); | 803 | kfree(tz); |
804 | } else if(!strncmp(dev_name(dev), "cooling_device", | 804 | } else if (!strncmp(dev_name(dev), "cooling_device", |
805 | sizeof("cooling_device") - 1)) { | 805 | sizeof("cooling_device") - 1)) { |
806 | cdev = to_cooling_device(dev); | 806 | cdev = to_cooling_device(dev); |
807 | kfree(cdev); | 807 | kfree(cdev); |
808 | } | 808 | } |
@@ -1036,8 +1036,8 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) | |||
1036 | 1036 | ||
1037 | mutex_lock(&thermal_list_lock); | 1037 | mutex_lock(&thermal_list_lock); |
1038 | list_for_each_entry(pos, &thermal_cdev_list, node) | 1038 | list_for_each_entry(pos, &thermal_cdev_list, node) |
1039 | if (pos == cdev) | 1039 | if (pos == cdev) |
1040 | break; | 1040 | break; |
1041 | if (pos != cdev) { | 1041 | if (pos != cdev) { |
1042 | /* thermal cooling device not found */ | 1042 | /* thermal cooling device not found */ |
1043 | mutex_unlock(&thermal_list_lock); | 1043 | mutex_unlock(&thermal_list_lock); |
@@ -1241,7 +1241,7 @@ thermal_zone_device_register(const char *type, int trips, int mask, | |||
1241 | /* Bind cooling devices for this zone */ | 1241 | /* Bind cooling devices for this zone */ |
1242 | bind_tz(tz); | 1242 | bind_tz(tz); |
1243 | 1243 | ||
1244 | INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); | 1244 | INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check); |
1245 | 1245 | ||
1246 | thermal_zone_device_reset(tz); | 1246 | thermal_zone_device_reset(tz); |
1247 | /* Update the new thermal zone and mark it as already updated. */ | 1247 | /* 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 | 1275 | ||
1276 | mutex_lock(&thermal_list_lock); | 1276 | mutex_lock(&thermal_list_lock); |
1277 | list_for_each_entry(pos, &thermal_tz_list, node) | 1277 | list_for_each_entry(pos, &thermal_tz_list, node) |
1278 | if (pos == tz) | 1278 | if (pos == tz) |
1279 | break; | 1279 | break; |
1280 | if (pos != tz) { | 1280 | if (pos != tz) { |
1281 | /* thermal zone device not found */ | 1281 | /* thermal zone device not found */ |
1282 | mutex_unlock(&thermal_list_lock); | 1282 | mutex_unlock(&thermal_list_lock); |