diff options
author | Zhang Rui <rui.zhang@intel.com> | 2012-06-26 22:09:36 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2012-09-24 02:44:37 -0400 |
commit | cddf31b3b293fd20358ea506f22445611425811f (patch) | |
tree | 0593121354b57e6781b480c117292107259b5b3f | |
parent | 2d374139d5b0b596cfbd892bf3ec7dacb3049904 (diff) |
Thermal: Rename thermal_instance.node to thermal_instance.tz_node.
thermal_instance should be referenced by both thermal zone devices
and thermal cooling devices.
Rename thermal_instance.node to thermal_instance.tz_node in this patch
and thermal_instanace.cdev_node will be introduced in next patch.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Eduardo Valentin <eduardo.valentin@ti.com>
-rw-r--r-- | drivers/thermal/thermal_sys.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 797d14891127..288437651da5 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -56,7 +56,7 @@ struct thermal_instance { | |||
56 | unsigned long lower; /* Lowest cooling state for this trip point */ | 56 | unsigned long lower; /* Lowest cooling state for this trip point */ |
57 | char attr_name[THERMAL_NAME_LENGTH]; | 57 | char attr_name[THERMAL_NAME_LENGTH]; |
58 | struct device_attribute attr; | 58 | struct device_attribute attr; |
59 | struct list_head node; | 59 | struct list_head tz_node; /* node in tz->thermal_instances */ |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static DEFINE_IDR(thermal_tz_idr); | 62 | static DEFINE_IDR(thermal_tz_idr); |
@@ -746,7 +746,7 @@ static void thermal_zone_device_passive(struct thermal_zone_device *tz, | |||
746 | /* Heating up? */ | 746 | /* Heating up? */ |
747 | if (trend == THERMAL_TREND_RAISING) { | 747 | if (trend == THERMAL_TREND_RAISING) { |
748 | list_for_each_entry(instance, &tz->thermal_instances, | 748 | list_for_each_entry(instance, &tz->thermal_instances, |
749 | node) { | 749 | tz_node) { |
750 | if (instance->trip != trip) | 750 | if (instance->trip != trip) |
751 | continue; | 751 | continue; |
752 | cdev = instance->cdev; | 752 | cdev = instance->cdev; |
@@ -757,7 +757,7 @@ static void thermal_zone_device_passive(struct thermal_zone_device *tz, | |||
757 | } | 757 | } |
758 | } else if (trend == THERMAL_TREND_DROPPING) { /* Cooling off? */ | 758 | } else if (trend == THERMAL_TREND_DROPPING) { /* Cooling off? */ |
759 | list_for_each_entry(instance, &tz->thermal_instances, | 759 | list_for_each_entry(instance, &tz->thermal_instances, |
760 | node) { | 760 | tz_node) { |
761 | if (instance->trip != trip) | 761 | if (instance->trip != trip) |
762 | continue; | 762 | continue; |
763 | cdev = instance->cdev; | 763 | cdev = instance->cdev; |
@@ -777,7 +777,7 @@ static void thermal_zone_device_passive(struct thermal_zone_device *tz, | |||
777 | * and avoid thrashing around the passive trip point. Note that we | 777 | * and avoid thrashing around the passive trip point. Note that we |
778 | * assume symmetry. | 778 | * assume symmetry. |
779 | */ | 779 | */ |
780 | list_for_each_entry(instance, &tz->thermal_instances, node) { | 780 | list_for_each_entry(instance, &tz->thermal_instances, tz_node) { |
781 | if (instance->trip != trip) | 781 | if (instance->trip != trip) |
782 | continue; | 782 | continue; |
783 | cdev = instance->cdev; | 783 | cdev = instance->cdev; |
@@ -873,13 +873,13 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | |||
873 | goto remove_symbol_link; | 873 | goto remove_symbol_link; |
874 | 874 | ||
875 | mutex_lock(&tz->lock); | 875 | mutex_lock(&tz->lock); |
876 | list_for_each_entry(pos, &tz->thermal_instances, node) | 876 | list_for_each_entry(pos, &tz->thermal_instances, tz_node) |
877 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { | 877 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { |
878 | result = -EEXIST; | 878 | result = -EEXIST; |
879 | break; | 879 | break; |
880 | } | 880 | } |
881 | if (!result) | 881 | if (!result) |
882 | list_add_tail(&dev->node, &tz->thermal_instances); | 882 | list_add_tail(&dev->tz_node, &tz->thermal_instances); |
883 | mutex_unlock(&tz->lock); | 883 | mutex_unlock(&tz->lock); |
884 | 884 | ||
885 | if (!result) | 885 | if (!result) |
@@ -912,9 +912,9 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, | |||
912 | struct thermal_instance *pos, *next; | 912 | struct thermal_instance *pos, *next; |
913 | 913 | ||
914 | mutex_lock(&tz->lock); | 914 | mutex_lock(&tz->lock); |
915 | list_for_each_entry_safe(pos, next, &tz->thermal_instances, node) { | 915 | list_for_each_entry_safe(pos, next, &tz->thermal_instances, tz_node) { |
916 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { | 916 | if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { |
917 | list_del(&pos->node); | 917 | list_del(&pos->tz_node); |
918 | mutex_unlock(&tz->lock); | 918 | mutex_unlock(&tz->lock); |
919 | goto unbind; | 919 | goto unbind; |
920 | } | 920 | } |
@@ -1117,7 +1117,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, | |||
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | if (temp >= trip_temp) { | 1119 | if (temp >= trip_temp) { |
1120 | list_for_each_entry(instance, &tz->thermal_instances, node) { | 1120 | list_for_each_entry(instance, &tz->thermal_instances, tz_node) { |
1121 | if (instance->trip != trip) | 1121 | if (instance->trip != trip) |
1122 | continue; | 1122 | continue; |
1123 | 1123 | ||
@@ -1136,7 +1136,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, | |||
1136 | cdev->ops->set_cur_state(cdev, cur_state); | 1136 | cdev->ops->set_cur_state(cdev, cur_state); |
1137 | } | 1137 | } |
1138 | } else { /* below trip */ | 1138 | } else { /* below trip */ |
1139 | list_for_each_entry(instance, &tz->thermal_instances, node) { | 1139 | list_for_each_entry(instance, &tz->thermal_instances, tz_node) { |
1140 | if (instance->trip != trip) | 1140 | if (instance->trip != trip) |
1141 | continue; | 1141 | continue; |
1142 | 1142 | ||