summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-04 12:21:01 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-08-22 22:46:13 +0300
commit1a6e1004f3225bebbe27e1575c22484a56e96f56 (patch)
treee7ee81b429ca3ae5b4a6c11abc30627f66967ff8 /drivers/thermal
parentb616959a59eed098fe34aa156d96c37880feabc6 (diff)
downloadlinux-1a6e1004f3225bebbe27e1575c22484a56e96f56.tar.xz
thermal: intel: int340x: simplify the code with module_platform_driver()
The init/exit() of the driver only calls platform_driver_{un}register(), so it can be simpilfied by using module_platform_driver(). Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/intel/int340x_thermal/int3401_thermal.c13
1 files changed, 1 insertions, 12 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");