History

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

Linus Torvalds committed 11 years ago

Commit 54d8ccc2 parents 56fd85b 541d5295 files · +18 −16Browse files

Unified · Split

5 files
  1. Documentation/devicetree/bindings/thermal/rcar-thermal.txt +1 −1
  2. drivers/thermal/st/st_thermal.c +1 −1
  3. drivers/thermal/st/st_thermal_memmap.c +5 −5
  4. drivers/thermal/st/st_thermal_syscfg.c +7 −7
  5. drivers/thermal/thermal_core.c +4 −2
Documentation/devicetree/bindings/thermal/rcar-thermal.txt+1−1
@@ -4,7 +4,7 @@ Required properties: · 3 unmodified lines
44 - compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal"
55 as fallback.
66 Examples with soctypes are:
7− - "renesas,thermal-r8a73a4" (R-Mobile AP6)
7+ - "renesas,thermal-r8a73a4" (R-Mobile APE6)
88 - "renesas,thermal-r8a7779" (R-Car H1)
99 - "renesas,thermal-r8a7790" (R-Car H2)
1010 - "renesas,thermal-r8a7791" (R-Car M2-W)
drivers/thermal/st/st_thermal.c+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 * Function to allocate regfields which are common
2626 * between syscfg and memory mapped based sensors
2727 */
28−int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
28+static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
2929 {
3030 struct device *dev = sensor->dev;
3131 struct regmap *regmap = sensor->regmap;
drivers/thermal/st/st_thermal_memmap.c+5−5
@@ -157,7 +157,7 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = { · 156 unmodified lines
157157 };
158158
159159 /* 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 = {
161161 .reg_fields = st_mmap_thermal_regfields,
162162 .ops = &st_mmap_sensor_ops,
163163 .calibration_val = 14,
@@ -166,7 +166,7 @@ const struct st_thermal_compat_data st_416mpe_cdata = { · 2 unmodified lines
166166 };
167167
168168 /* 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 = {
170170 .reg_fields = st_mmap_thermal_regfields,
171171 .ops = &st_mmap_sensor_ops,
172172 .calibration_val = 16,
@@ -174,19 +174,19 @@ const struct st_thermal_compat_data st_407_cdata = { · 1 unmodified line
174174 .crit_temp = 120,
175175 };
176176
177−static struct of_device_id st_mmap_thermal_of_match[] = {
177+static const struct of_device_id st_mmap_thermal_of_match[] = {
178178 { .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata },
179179 { .compatible = "st,stih407-thermal", .data = &st_407_cdata },
180180 { /* sentinel */ }
181181 };
182182 MODULE_DEVICE_TABLE(of, st_mmap_thermal_of_match);
183183
184−int st_mmap_probe(struct platform_device *pdev)
184+static int st_mmap_probe(struct platform_device *pdev)
185185 {
186186 return st_thermal_register(pdev, st_mmap_thermal_of_match);
187187 }
188188
189−int st_mmap_remove(struct platform_device *pdev)
189+static int st_mmap_remove(struct platform_device *pdev)
190190 {
191191 return st_thermal_unregister(pdev);
192192 }
drivers/thermal/st/st_thermal_syscfg.c+7−7
@@ -104,7 +104,7 @@ static const struct st_thermal_sensor_ops st_syscfg_sensor_ops = { · 103 unmodified lines
104104 };
105105
106106 /* 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 = {
108108 .sys_compat = "st,stih415-front-syscfg",
109109 .reg_fields = st_415sas_regfields,
110110 .ops = &st_syscfg_sensor_ops,
@@ -114,7 +114,7 @@ const struct st_thermal_compat_data st_415sas_cdata = { · 3 unmodified lines
114114 };
115115
116116 /* 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 = {
118118 .sys_compat = "st,stih415-system-syscfg",
119119 .reg_fields = st_415mpe_regfields,
120120 .ops = &st_syscfg_sensor_ops,
@@ -124,7 +124,7 @@ const struct st_thermal_compat_data st_415mpe_cdata = { · 3 unmodified lines
124124 };
125125
126126 /* 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 = {
128128 .sys_compat = "st,stih416-front-syscfg",
129129 .reg_fields = st_416sas_regfields,
130130 .ops = &st_syscfg_sensor_ops,
@@ -134,7 +134,7 @@ const struct st_thermal_compat_data st_416sas_cdata = { · 3 unmodified lines
134134 };
135135
136136 /* 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 = {
138138 .sys_compat = "st,stid127-cpu-syscfg",
139139 .reg_fields = st_127_regfields,
140140 .ops = &st_syscfg_sensor_ops,
@@ -143,7 +143,7 @@ const struct st_thermal_compat_data st_127_cdata = { · 2 unmodified lines
143143 .crit_temp = 120,
144144 };
145145
146−static struct of_device_id st_syscfg_thermal_of_match[] = {
146+static const struct of_device_id st_syscfg_thermal_of_match[] = {
147147 { .compatible = "st,stih415-sas-thermal", .data = &st_415sas_cdata },
148148 { .compatible = "st,stih415-mpe-thermal", .data = &st_415mpe_cdata },
149149 { .compatible = "st,stih416-sas-thermal", .data = &st_416sas_cdata },
@@ -152,12 +152,12 @@ static struct of_device_id st_syscfg_thermal_of_match[] = { · 2 unmodified lines
152152 };
153153 MODULE_DEVICE_TABLE(of, st_syscfg_thermal_of_match);
154154
155−int st_syscfg_probe(struct platform_device *pdev)
155+static int st_syscfg_probe(struct platform_device *pdev)
156156 {
157157 return st_thermal_register(pdev, st_syscfg_thermal_of_match);
158158 }
159159
160−int st_syscfg_remove(struct platform_device *pdev)
160+static int st_syscfg_remove(struct platform_device *pdev)
161161 {
162162 return st_thermal_unregister(pdev);
163163 }
drivers/thermal/thermal_core.c+4−2
@@ -458,8 +458,10 @@ static void update_temperature(struct thermal_zone_device *tz) · 457 unmodified lines
458458
459459 ret = thermal_zone_get_temp(tz, &temp);
460460 if (ret) {
461− dev_warn(&tz->device, "failed to read out thermal zone %d\n",
462− tz->id);
461+ if (ret != -EAGAIN)
462+ dev_warn(&tz->device,
463+ "failed to read out thermal zone (%d)\n",
464+ ret);
463465 return;
464466 }
465467