Skip to content

Commit 53e41b8

Browse files
Shang XiaoJingrafaeljw
authored andcommitted
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: Shang XiaoJing <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c4e927d commit 53e41b8

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,7 @@ static struct pci_driver proc_thermal_pci_driver = {
373373
.driver.pm = &proc_thermal_pci_pm,
374374
};
375375

376-
static int __init proc_thermal_init(void)
377-
{
378-
return pci_register_driver(&proc_thermal_pci_driver);
379-
}
380-
381-
static void __exit proc_thermal_exit(void)
382-
{
383-
pci_unregister_driver(&proc_thermal_pci_driver);
384-
}
385-
386-
module_init(proc_thermal_init);
387-
module_exit(proc_thermal_exit);
376+
module_pci_driver(proc_thermal_pci_driver);
388377

389378
MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
390379
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,7 @@ static struct pci_driver proc_thermal_pci_driver = {
151151
.driver.pm = &proc_thermal_pci_pm,
152152
};
153153

154-
static int __init proc_thermal_init(void)
155-
{
156-
return pci_register_driver(&proc_thermal_pci_driver);
157-
}
158-
159-
static void __exit proc_thermal_exit(void)
160-
{
161-
pci_unregister_driver(&proc_thermal_pci_driver);
162-
}
163-
164-
module_init(proc_thermal_init);
165-
module_exit(proc_thermal_exit);
154+
module_pci_driver(proc_thermal_pci_driver);
166155

167156
MODULE_AUTHOR("Srinivas Pandruvada <[email protected]>");
168157
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");

0 commit comments

Comments
 (0)