diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-24 19:54:17 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-24 19:54:17 +0200 |
commit | d08122864e7d127d3481c97f9e8afda1371e116b (patch) | |
tree | 0ce71ff6054558a48c47ee9bb26d58aa740aa124 /drivers/thermal/intel | |
parent | thermal/of: Fix potential uninitialized value access (diff) | |
parent | thermal: intel: intel_soc_dts_iosf: Remove redundant check (diff) | |
download | linux-d08122864e7d127d3481c97f9e8afda1371e116b.tar.xz linux-d08122864e7d127d3481c97f9e8afda1371e116b.zip |
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()
Diffstat (limited to 'drivers/thermal/intel')
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3401_thermal.c | 13 | ||||
-rw-r--r-- | drivers/thermal/intel/intel_soc_dts_iosf.c | 8 |
2 files changed, 4 insertions, 17 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c b/drivers/thermal/intel/int340x_thermal/int3401_thermal.c index 217786fba185..c93a28eec4db 100644 --- a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3401_thermal.c @@ -70,18 +70,7 @@ static struct platform_driver int3401_driver = { }, }; -static int __init proc_thermal_init(void) -{ - return platform_driver_register(&int3401_driver); -} - -static void __exit proc_thermal_exit(void) -{ - platform_driver_unregister(&int3401_driver); -} - -module_init(proc_thermal_init); -module_exit(proc_thermal_exit); +module_platform_driver(int3401_driver); MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>"); MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver"); diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index 7a66d0f077b0..d00def3c4703 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -212,11 +212,9 @@ static int soc_dts_enable(int id) static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts) { - if (dts) { - iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, - SOC_DTS_OFFSET_ENABLE, dts->store_status); - thermal_zone_device_unregister(dts->tzone); - } + iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, + SOC_DTS_OFFSET_ENABLE, dts->store_status); + thermal_zone_device_unregister(dts->tzone); } static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts, |