Skip to content

Commit d081228

Browse files
committed
Merge updates of thermal drivers for Intel platforms for 6.6-rc1.
These remove a redundant check from a driver's "remove" routine and use module_platform_driver() to replace an open-coded version of it in one driver. * thermal-intel: thermal: intel: intel_soc_dts_iosf: Remove redundant check thermal: intel: int340x: simplify the code with module_platform_driver()
2 parents f96801f + ee188ee commit d081228

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

drivers/thermal/intel/int340x_thermal/int3401_thermal.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,7 @@ static struct platform_driver int3401_driver = {
7070
},
7171
};
7272

73-
static int __init proc_thermal_init(void)
74-
{
75-
return platform_driver_register(&int3401_driver);
76-
}
77-
78-
static void __exit proc_thermal_exit(void)
79-
{
80-
platform_driver_unregister(&int3401_driver);
81-
}
82-
83-
module_init(proc_thermal_init);
84-
module_exit(proc_thermal_exit);
73+
module_platform_driver(int3401_driver);
8574

8675
MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
8776
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");

drivers/thermal/intel/intel_soc_dts_iosf.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,9 @@ static int soc_dts_enable(int id)
212212

213213
static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts)
214214
{
215-
if (dts) {
216-
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE,
217-
SOC_DTS_OFFSET_ENABLE, dts->store_status);
218-
thermal_zone_device_unregister(dts->tzone);
219-
}
215+
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE,
216+
SOC_DTS_OFFSET_ENABLE, dts->store_status);
217+
thermal_zone_device_unregister(dts->tzone);
220218
}
221219

222220
static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts,

0 commit comments

Comments
 (0)