Skip to content

Commit 54d8ccc

Browse files
committed
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
2 parents 56fd85b + 541d529 commit 54d8ccc

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

Documentation/devicetree/bindings/thermal/rcar-thermal.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Required properties:
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = {
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,27 +166,27 @@ const struct st_thermal_compat_data st_416mpe_cdata = {
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,
173173
.temp_adjust_val = -95,
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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static const struct st_thermal_sensor_ops st_syscfg_sensor_ops = {
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 = {
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 = {
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 = {
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 = {
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[] = {
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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,10 @@ static void update_temperature(struct thermal_zone_device *tz)
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

0 commit comments

Comments
 (0)