Skip to content

Commit 1aa4f92

Browse files
committed
thermal: intel: intel_pch: Rename device operations callbacks
Because the same device operations callbacks are used for all supported boards, they are in fact generic, so rename them to reflect that. Also rename the operations object itself for consistency. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Tested-by: Zhang Rui <[email protected]> Reviewed-by: Zhang Rui <[email protected]>
1 parent 558718f commit 1aa4f92

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

drivers/thermal/intel/intel_pch_thermal.c

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd, int trip)
118118
}
119119
#endif
120120

121-
static int pch_wpt_init(struct pch_thermal_device *ptd)
121+
static int pch_hw_init(struct pch_thermal_device *ptd)
122122
{
123123
int nr_trips = 0;
124124
u16 trip_temp;
@@ -164,13 +164,13 @@ static int pch_wpt_init(struct pch_thermal_device *ptd)
164164
return nr_trips + pch_wpt_add_acpi_psv_trip(ptd, nr_trips);
165165
}
166166

167-
static int pch_wpt_get_temp(struct pch_thermal_device *ptd)
167+
static int pch_get_temp(struct pch_thermal_device *ptd)
168168
{
169169
return GET_WPT_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP));
170170
}
171171

172172
/* Cool the PCH when it's overheat in .suspend_noirq phase */
173-
static int pch_wpt_suspend(struct pch_thermal_device *ptd)
173+
static int pch_suspend(struct pch_thermal_device *ptd)
174174
{
175175
u8 tsel;
176176
int pch_delay_cnt = 0;
@@ -237,7 +237,7 @@ static int pch_wpt_suspend(struct pch_thermal_device *ptd)
237237
return 0;
238238
}
239239

240-
static int pch_wpt_resume(struct pch_thermal_device *ptd)
240+
static int pch_resume(struct pch_thermal_device *ptd)
241241
{
242242
u8 tsel;
243243

@@ -258,13 +258,11 @@ struct pch_dev_ops {
258258
int (*resume)(struct pch_thermal_device *ptd);
259259
};
260260

261-
262-
/* dev ops for Wildcat Point */
263-
static const struct pch_dev_ops pch_dev_ops_wpt = {
264-
.hw_init = pch_wpt_init,
265-
.get_temp = pch_wpt_get_temp,
266-
.suspend = pch_wpt_suspend,
267-
.resume = pch_wpt_resume,
261+
static const struct pch_dev_ops pch_dev_ops = {
262+
.hw_init = pch_hw_init,
263+
.get_temp = pch_get_temp,
264+
.suspend = pch_suspend,
265+
.resume = pch_resume,
268266
};
269267

270268
static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp)
@@ -301,31 +299,31 @@ static const struct board_info {
301299
} board_info[] = {
302300
[board_hsw] = {
303301
.name = "pch_haswell",
304-
.ops = &pch_dev_ops_wpt,
302+
.ops = &pch_dev_ops,
305303
},
306304
[board_wpt] = {
307305
.name = "pch_wildcat_point",
308-
.ops = &pch_dev_ops_wpt,
306+
.ops = &pch_dev_ops,
309307
},
310308
[board_skl] = {
311309
.name = "pch_skylake",
312-
.ops = &pch_dev_ops_wpt,
310+
.ops = &pch_dev_ops,
313311
},
314312
[board_cnl] = {
315313
.name = "pch_cannonlake",
316-
.ops = &pch_dev_ops_wpt,
314+
.ops = &pch_dev_ops,
317315
},
318316
[board_cml] = {
319317
.name = "pch_cometlake",
320-
.ops = &pch_dev_ops_wpt,
318+
.ops = &pch_dev_ops,
321319
},
322320
[board_lwb] = {
323321
.name = "pch_lewisburg",
324-
.ops = &pch_dev_ops_wpt,
322+
.ops = &pch_dev_ops,
325323
},
326324
[board_wbg] = {
327325
.name = "pch_wellsburg",
328-
.ops = &pch_dev_ops_wpt,
326+
.ops = &pch_dev_ops,
329327
},
330328
};
331329

0 commit comments

Comments
 (0)