thermal/drivers/int340x/processor_thermal: Switch to use module_pci_driver() macro
PATCH 1/1 thermal/drivers/int340x/processor_thermal: Switch to use module_pci_driver() macro
Since pci provides the helper macro module_pci_driver(), we may replace the module_init/exit with it.
Signed-off-by Shang XiaoJing <[email protected]>
--- .../int340x_thermal/processor_thermal_device_pci.c | 13 +------------ .../processor_thermal_device_pci_legacy.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +1 -12
@@ -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 <[email protected]>" );MODULE_DESCRIPTION ("Processor Thermal Reporting Device Driver" );
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c +1 -12
@@ -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 <[email protected]>" );MODULE_DESCRIPTION ("Processor Thermal Reporting Device Driver" );
Signature · 1 line
2.17.1
Quoted 49 lines · Shang XiaoJing
Since pci provides the helper macro
module_pci_driver(), we may replace the module_init/exit with it.Signed-off-by Shang XiaoJing <[email protected]>--- .../int340x_thermal/processor_thermal_device_pci.c | 13 +------------ .../processor_thermal_device_pci_legacy.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-)drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +1
-12@@ -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 <[email protected]>" );MODULE_DESCRIPTION ("Processor Thermal Reporting Device Driver" );drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c +0
-7@@ -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) -{
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c static struct pci_driver proc_thermal_pci_driver = {
Quoted 10 lines
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c +1
-6-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 <[email protected]>" );MODULE_DESCRIPTION ("Processor Thermal Reporting Device Driver" ); --
Applied as 6.1 material with some edits in the subject and changelog.
Thanks!