Skip to content

Commit 541d529

Browse files
author
Eduardo Valentin
committed
drivers: thermal: st: remove several sparse warnings
Simple patch to make symbols static. Symbols that are not shared with other parts of the kernel can be made static. This change also removes several sparse complains. Cc: Zhang Rui <[email protected]> Cc: Lee Jones <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Ajit Pal Singh <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Eduardo Valentin <[email protected]>
1 parent d877a62 commit 541d529

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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: 4 additions & 4 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,7 +166,7 @@ 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,
@@ -181,12 +181,12 @@ static const struct of_device_id st_mmap_thermal_of_match[] = {
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: 6 additions & 6 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,
@@ -152,12 +152,12 @@ static const 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
}

0 commit comments

Comments
 (0)