Skip to content

Commit

Permalink
thermal: intel: int340x: simplify the code with module_platform_driver()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Rafael J. Wysocki committed Aug 22, 2023
1 parent b616959 commit 1a6e100
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/thermal/intel/int340x_thermal/int3401_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1a6e100

Please sign in to comment.