Commit 53e41b85 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Rafael J. Wysocki

thermal: int340x: processor_thermal: Use module_pci_driver() macro

Since PCI provides helper macro module_pci_driver(), the
module_init/exit code can be replaced with it.
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c4e927da
...@@ -373,18 +373,7 @@ static struct pci_driver proc_thermal_pci_driver = { ...@@ -373,18 +373,7 @@ static struct pci_driver proc_thermal_pci_driver = {
.driver.pm = &proc_thermal_pci_pm, .driver.pm = &proc_thermal_pci_pm,
}; };
static int __init proc_thermal_init(void) module_pci_driver(proc_thermal_pci_driver);
{
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_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>"); MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver"); MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");
......
...@@ -151,18 +151,7 @@ static struct pci_driver proc_thermal_pci_driver = { ...@@ -151,18 +151,7 @@ static struct pci_driver proc_thermal_pci_driver = {
.driver.pm = &proc_thermal_pci_pm, .driver.pm = &proc_thermal_pci_pm,
}; };
static int __init proc_thermal_init(void) module_pci_driver(proc_thermal_pci_driver);
{
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_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>"); MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver"); MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment