diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-11 23:06:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-11 23:06:59 -0400 |
commit | dfb22fc5c0eb7645f47a752ce537bfb2c8a6aea6 (patch) | |
tree | dbdd946fa2b7fd6bee1a48b2a7f80ce937967e44 | |
parent | 01b0c014eeb0bb857a5dc572cd108be7becddfe7 (diff) |
thermal: fix intel PCH thermal driver mismerge
I didn't notice this when merging the thermal code from Zhang, but his
merge (commit 5a924a07f882: "Merge branches 'thermal-core' and
'thermal-intel' of .git into next") of the thermal-core and
thermal-intel branches was wrong.
In thermal-core, commit 17e8351a7739 ("thermal: consistently use int for
temperatures") converted the thermal layer to use "int" for
temperatures.
But in parallel, in the thermal-intel branch commit d0a12625d2ff
("thermal: Add Intel PCH thermal driver") added support for the intel
PCH thermal sensor using the old interfaces that used "unsigned long"
pointers.
This resulted in warnings like this:
drivers/thermal/intel_pch_thermal.c:184:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.get_temp = pch_thermal_get_temp,
^
drivers/thermal/intel_pch_thermal.c:184:14: note: (near initialization for ‘tzd_ops.get_temp’)
drivers/thermal/intel_pch_thermal.c:186:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.get_trip_temp = pch_get_trip_temp,
^
drivers/thermal/intel_pch_thermal.c:186:19: note: (near initialization for ‘tzd_ops.get_trip_temp’)
This fixes it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/thermal/intel_pch_thermal.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/thermal/intel_pch_thermal.c b/drivers/thermal/intel_pch_thermal.c index 1650a62484bd..50c7da79be83 100644 --- a/drivers/thermal/intel_pch_thermal.c +++ b/drivers/thermal/intel_pch_thermal.c | |||
@@ -117,8 +117,7 @@ read_trips: | |||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | static int pch_wpt_get_temp(struct pch_thermal_device *ptd, | 120 | static int pch_wpt_get_temp(struct pch_thermal_device *ptd, int *temp) |
121 | unsigned long *temp) | ||
122 | { | 121 | { |
123 | u8 wpt_temp; | 122 | u8 wpt_temp; |
124 | 123 | ||
@@ -132,7 +131,7 @@ static int pch_wpt_get_temp(struct pch_thermal_device *ptd, | |||
132 | 131 | ||
133 | struct pch_dev_ops { | 132 | struct pch_dev_ops { |
134 | int (*hw_init)(struct pch_thermal_device *ptd, int *nr_trips); | 133 | int (*hw_init)(struct pch_thermal_device *ptd, int *nr_trips); |
135 | int (*get_temp)(struct pch_thermal_device *ptd, unsigned long *temp); | 134 | int (*get_temp)(struct pch_thermal_device *ptd, int *temp); |
136 | }; | 135 | }; |
137 | 136 | ||
138 | 137 | ||
@@ -142,8 +141,7 @@ static struct pch_dev_ops pch_dev_ops_wpt = { | |||
142 | .get_temp = pch_wpt_get_temp, | 141 | .get_temp = pch_wpt_get_temp, |
143 | }; | 142 | }; |
144 | 143 | ||
145 | static int pch_thermal_get_temp(struct thermal_zone_device *tzd, | 144 | static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) |
146 | unsigned long *temp) | ||
147 | { | 145 | { |
148 | struct pch_thermal_device *ptd = tzd->devdata; | 146 | struct pch_thermal_device *ptd = tzd->devdata; |
149 | 147 | ||
@@ -165,8 +163,7 @@ static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip, | |||
165 | return 0; | 163 | return 0; |
166 | } | 164 | } |
167 | 165 | ||
168 | static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, | 166 | static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *temp) |
169 | unsigned long *temp) | ||
170 | { | 167 | { |
171 | struct pch_thermal_device *ptd = tzd->devdata; | 168 | struct pch_thermal_device *ptd = tzd->devdata; |
172 | 169 | ||