Skip to content

Commit

Permalink
thermal: int340x: processor_thermal: Use module_pci_driver() macro
Browse files Browse the repository at this point in the history
Since PCI provides helper macro module_pci_driver(), the
module_init/exit code can be replaced with it.

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Shang XiaoJing authored and Rafael J. Wysocki committed Sep 24, 2022
1 parent c4e927d commit 53e41b8
Showing 2 changed files with 2 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -373,18 +373,7 @@ static struct pci_driver proc_thermal_pci_driver = {
.driver.pm = &proc_thermal_pci_pm,
};

static int __init proc_thermal_init(void)
{
return pci_register_driver(&proc_thermal_pci_driver);
}

static void __exit proc_thermal_exit(void)
{
pci_unregister_driver(&proc_thermal_pci_driver);
}

module_init(proc_thermal_init);
module_exit(proc_thermal_exit);
module_pci_driver(proc_thermal_pci_driver);

MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");
Original file line number Diff line number Diff line change
@@ -151,18 +151,7 @@ static struct pci_driver proc_thermal_pci_driver = {
.driver.pm = &proc_thermal_pci_pm,
};

static int __init proc_thermal_init(void)
{
return pci_register_driver(&proc_thermal_pci_driver);
}

static void __exit proc_thermal_exit(void)
{
pci_unregister_driver(&proc_thermal_pci_driver);
}

module_init(proc_thermal_init);
module_exit(proc_thermal_exit);
module_pci_driver(proc_thermal_pci_driver);

MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");

0 comments on commit 53e41b8

Please sign in to comment.