diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-12 13:43:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-12 13:43:30 -0400 |
commit | 54d8ccc30270586f869bfb46ff8a8ca330c8aa23 (patch) | |
tree | e8af941e1817e12a1a3dc96161350bd196cdef3a | |
parent | 56fd85b5dd595c84ed12b4b12e9b271876ac34de (diff) | |
parent | 541d529f9845d249d1cb84f1b395e48f0a117e3f (diff) |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull last minute thermal-SoC management fixes from Eduardo Valentin:
"Specifics:
- Minor fixes on ST and RCAR thermal drivers.
- Avoid flooding kernel log when driver returns -EAGAIN.
Note: I am sending this pull on Rui's behalf while he fixes issues in
his Linux box"
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
drivers: thermal: st: remove several sparse warnings
thermal: constify of_device_id array
thermal: Do not log an error if thermal_zone_get_temp returns -EAGAIN
thermal: rcar: Fix typo in r8a73a4 SoC name
-rw-r--r-- | Documentation/devicetree/bindings/thermal/rcar-thermal.txt | 2 | ||||
-rw-r--r-- | drivers/thermal/st/st_thermal.c | 2 | ||||
-rw-r--r-- | drivers/thermal/st/st_thermal_memmap.c | 10 | ||||
-rw-r--r-- | drivers/thermal/st/st_thermal_syscfg.c | 14 | ||||
-rw-r--r-- | drivers/thermal/thermal_core.c | 6 |
5 files changed, 18 insertions, 16 deletions
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt index 43404b197933..332e625f6ed0 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal" | 4 | - compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal" |
5 | as fallback. | 5 | as fallback. |
6 | Examples with soctypes are: | 6 | Examples with soctypes are: |
7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) | 7 | - "renesas,thermal-r8a73a4" (R-Mobile APE6) |
8 | - "renesas,thermal-r8a7779" (R-Car H1) | 8 | - "renesas,thermal-r8a7779" (R-Car H1) |
9 | - "renesas,thermal-r8a7790" (R-Car H2) | 9 | - "renesas,thermal-r8a7790" (R-Car H2) |
10 | - "renesas,thermal-r8a7791" (R-Car M2-W) | 10 | - "renesas,thermal-r8a7791" (R-Car M2-W) |
diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c index d1ec5804c0bb..76c515dd802b 100644 --- a/drivers/thermal/st/st_thermal.c +++ b/drivers/thermal/st/st_thermal.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * Function to allocate regfields which are common | 25 | * Function to allocate regfields which are common |
26 | * between syscfg and memory mapped based sensors | 26 | * between syscfg and memory mapped based sensors |
27 | */ | 27 | */ |
28 | int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) | 28 | static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) |
29 | { | 29 | { |
30 | struct device *dev = sensor->dev; | 30 | struct device *dev = sensor->dev; |
31 | struct regmap *regmap = sensor->regmap; | 31 | struct regmap *regmap = sensor->regmap; |
diff --git a/drivers/thermal/st/st_thermal_memmap.c b/drivers/thermal/st/st_thermal_memmap.c index 067bfcdb91d6..fc0c9e198710 100644 --- a/drivers/thermal/st/st_thermal_memmap.c +++ b/drivers/thermal/st/st_thermal_memmap.c | |||
@@ -157,7 +157,7 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = { | |||
157 | }; | 157 | }; |
158 | 158 | ||
159 | /* Compatible device data stih416 mpe thermal sensor */ | 159 | /* Compatible device data stih416 mpe thermal sensor */ |
160 | const struct st_thermal_compat_data st_416mpe_cdata = { | 160 | static const struct st_thermal_compat_data st_416mpe_cdata = { |
161 | .reg_fields = st_mmap_thermal_regfields, | 161 | .reg_fields = st_mmap_thermal_regfields, |
162 | .ops = &st_mmap_sensor_ops, | 162 | .ops = &st_mmap_sensor_ops, |
163 | .calibration_val = 14, | 163 | .calibration_val = 14, |
@@ -166,7 +166,7 @@ const struct st_thermal_compat_data st_416mpe_cdata = { | |||
166 | }; | 166 | }; |
167 | 167 | ||
168 | /* Compatible device data stih407 thermal sensor */ | 168 | /* Compatible device data stih407 thermal sensor */ |
169 | const struct st_thermal_compat_data st_407_cdata = { | 169 | static const struct st_thermal_compat_data st_407_cdata = { |
170 | .reg_fields = st_mmap_thermal_regfields, | 170 | .reg_fields = st_mmap_thermal_regfields, |
171 | .ops = &st_mmap_sensor_ops, | 171 | .ops = &st_mmap_sensor_ops, |
172 | .calibration_val = 16, | 172 | .calibration_val = 16, |
@@ -174,19 +174,19 @@ const struct st_thermal_compat_data st_407_cdata = { | |||
174 | .crit_temp = 120, | 174 | .crit_temp = 120, |
175 | }; | 175 | }; |
176 | 176 | ||
177 | static struct of_device_id st_mmap_thermal_of_match[] = { | 177 | static const struct of_device_id st_mmap_thermal_of_match[] = { |
178 | { .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata }, | 178 | { .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata }, |
179 | { .compatible = "st,stih407-thermal", .data = &st_407_cdata }, | 179 | { .compatible = "st,stih407-thermal", .data = &st_407_cdata }, |
180 | { /* sentinel */ } | 180 | { /* sentinel */ } |
181 | }; | 181 | }; |
182 | MODULE_DEVICE_TABLE(of, st_mmap_thermal_of_match); | 182 | MODULE_DEVICE_TABLE(of, st_mmap_thermal_of_match); |
183 | 183 | ||
184 | int st_mmap_probe(struct platform_device *pdev) | 184 | static int st_mmap_probe(struct platform_device *pdev) |
185 | { | 185 | { |
186 | return st_thermal_register(pdev, st_mmap_thermal_of_match); | 186 | return st_thermal_register(pdev, st_mmap_thermal_of_match); |
187 | } | 187 | } |
188 | 188 | ||
189 | int st_mmap_remove(struct platform_device *pdev) | 189 | static int st_mmap_remove(struct platform_device *pdev) |
190 | { | 190 | { |
191 | return st_thermal_unregister(pdev); | 191 | return st_thermal_unregister(pdev); |
192 | } | 192 | } |
diff --git a/drivers/thermal/st/st_thermal_syscfg.c b/drivers/thermal/st/st_thermal_syscfg.c index 26d36a242bb8..3df5b7890703 100644 --- a/drivers/thermal/st/st_thermal_syscfg.c +++ b/drivers/thermal/st/st_thermal_syscfg.c | |||
@@ -104,7 +104,7 @@ static const struct st_thermal_sensor_ops st_syscfg_sensor_ops = { | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* Compatible device data for stih415 sas thermal sensor */ | 106 | /* Compatible device data for stih415 sas thermal sensor */ |
107 | const struct st_thermal_compat_data st_415sas_cdata = { | 107 | static const struct st_thermal_compat_data st_415sas_cdata = { |
108 | .sys_compat = "st,stih415-front-syscfg", | 108 | .sys_compat = "st,stih415-front-syscfg", |
109 | .reg_fields = st_415sas_regfields, | 109 | .reg_fields = st_415sas_regfields, |
110 | .ops = &st_syscfg_sensor_ops, | 110 | .ops = &st_syscfg_sensor_ops, |
@@ -114,7 +114,7 @@ const struct st_thermal_compat_data st_415sas_cdata = { | |||
114 | }; | 114 | }; |
115 | 115 | ||
116 | /* Compatible device data for stih415 mpe thermal sensor */ | 116 | /* Compatible device data for stih415 mpe thermal sensor */ |
117 | const struct st_thermal_compat_data st_415mpe_cdata = { | 117 | static const struct st_thermal_compat_data st_415mpe_cdata = { |
118 | .sys_compat = "st,stih415-system-syscfg", | 118 | .sys_compat = "st,stih415-system-syscfg", |
119 | .reg_fields = st_415mpe_regfields, | 119 | .reg_fields = st_415mpe_regfields, |
120 | .ops = &st_syscfg_sensor_ops, | 120 | .ops = &st_syscfg_sensor_ops, |
@@ -124,7 +124,7 @@ const struct st_thermal_compat_data st_415mpe_cdata = { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | /* Compatible device data for stih416 sas thermal sensor */ | 126 | /* Compatible device data for stih416 sas thermal sensor */ |
127 | const struct st_thermal_compat_data st_416sas_cdata = { | 127 | static const struct st_thermal_compat_data st_416sas_cdata = { |
128 | .sys_compat = "st,stih416-front-syscfg", | 128 | .sys_compat = "st,stih416-front-syscfg", |
129 | .reg_fields = st_416sas_regfields, | 129 | .reg_fields = st_416sas_regfields, |
130 | .ops = &st_syscfg_sensor_ops, | 130 | .ops = &st_syscfg_sensor_ops, |
@@ -134,7 +134,7 @@ const struct st_thermal_compat_data st_416sas_cdata = { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* Compatible device data for stid127 thermal sensor */ | 136 | /* Compatible device data for stid127 thermal sensor */ |
137 | const struct st_thermal_compat_data st_127_cdata = { | 137 | static const struct st_thermal_compat_data st_127_cdata = { |
138 | .sys_compat = "st,stid127-cpu-syscfg", | 138 | .sys_compat = "st,stid127-cpu-syscfg", |
139 | .reg_fields = st_127_regfields, | 139 | .reg_fields = st_127_regfields, |
140 | .ops = &st_syscfg_sensor_ops, | 140 | .ops = &st_syscfg_sensor_ops, |
@@ -143,7 +143,7 @@ const struct st_thermal_compat_data st_127_cdata = { | |||
143 | .crit_temp = 120, | 143 | .crit_temp = 120, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct of_device_id st_syscfg_thermal_of_match[] = { | 146 | static const struct of_device_id st_syscfg_thermal_of_match[] = { |
147 | { .compatible = "st,stih415-sas-thermal", .data = &st_415sas_cdata }, | 147 | { .compatible = "st,stih415-sas-thermal", .data = &st_415sas_cdata }, |
148 | { .compatible = "st,stih415-mpe-thermal", .data = &st_415mpe_cdata }, | 148 | { .compatible = "st,stih415-mpe-thermal", .data = &st_415mpe_cdata }, |
149 | { .compatible = "st,stih416-sas-thermal", .data = &st_416sas_cdata }, | 149 | { .compatible = "st,stih416-sas-thermal", .data = &st_416sas_cdata }, |
@@ -152,12 +152,12 @@ static struct of_device_id st_syscfg_thermal_of_match[] = { | |||
152 | }; | 152 | }; |
153 | MODULE_DEVICE_TABLE(of, st_syscfg_thermal_of_match); | 153 | MODULE_DEVICE_TABLE(of, st_syscfg_thermal_of_match); |
154 | 154 | ||
155 | int st_syscfg_probe(struct platform_device *pdev) | 155 | static int st_syscfg_probe(struct platform_device *pdev) |
156 | { | 156 | { |
157 | return st_thermal_register(pdev, st_syscfg_thermal_of_match); | 157 | return st_thermal_register(pdev, st_syscfg_thermal_of_match); |
158 | } | 158 | } |
159 | 159 | ||
160 | int st_syscfg_remove(struct platform_device *pdev) | 160 | static int st_syscfg_remove(struct platform_device *pdev) |
161 | { | 161 | { |
162 | return st_thermal_unregister(pdev); | 162 | return st_thermal_unregister(pdev); |
163 | } | 163 | } |
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 174d3bcf8bd7..4108db7e10c1 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
@@ -458,8 +458,10 @@ static void update_temperature(struct thermal_zone_device *tz) | |||
458 | 458 | ||
459 | ret = thermal_zone_get_temp(tz, &temp); | 459 | ret = thermal_zone_get_temp(tz, &temp); |
460 | if (ret) { | 460 | if (ret) { |
461 | dev_warn(&tz->device, "failed to read out thermal zone %d\n", | 461 | if (ret != -EAGAIN) |
462 | tz->id); | 462 | dev_warn(&tz->device, |
463 | "failed to read out thermal zone (%d)\n", | ||
464 | ret); | ||
463 | return; | 465 | return; |
464 | } | 466 | } |
465 | 467 | ||