Skip to content

Commit 1a6e100

Browse files
Yang Yingliangrafaeljw
authored andcommitted
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 <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b616959 commit 1a6e100

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
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");

0 commit comments

Comments
 (0)