]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: use module_pci_driver
authorAxel Lin <axel.lin@gmail.com>
Tue, 3 Apr 2012 01:25:46 +0000 (21:25 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Tue, 3 Apr 2012 03:57:12 +0000 (20:57 -0700)
This patch converts the drivers in drivers/hwmon/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/fam15h_power.c
drivers/hwmon/k10temp.c
drivers/hwmon/k8temp.c

index b7494af1e4a9ba8cb6952c83d96b845f19f9e7fd..2f449885ce4d5a20bb294e1efc355c19c4025f48 100644 (file)
@@ -215,15 +215,4 @@ static struct pci_driver fam15h_power_driver = {
        .remove = __devexit_p(fam15h_power_remove),
 };
 
-static int __init fam15h_power_init(void)
-{
-       return pci_register_driver(&fam15h_power_driver);
-}
-
-static void __exit fam15h_power_exit(void)
-{
-       pci_unregister_driver(&fam15h_power_driver);
-}
-
-module_init(fam15h_power_init)
-module_exit(fam15h_power_exit)
+module_pci_driver(fam15h_power_driver);
index 307bb325dde952bcc6929ed39d4dd96fc9eca70d..7356b5ec8f6733bd9b4cc9a96f6f790831c60f6b 100644 (file)
@@ -225,15 +225,4 @@ static struct pci_driver k10temp_driver = {
        .remove = __devexit_p(k10temp_remove),
 };
 
-static int __init k10temp_init(void)
-{
-       return pci_register_driver(&k10temp_driver);
-}
-
-static void __exit k10temp_exit(void)
-{
-       pci_unregister_driver(&k10temp_driver);
-}
-
-module_init(k10temp_init)
-module_exit(k10temp_exit)
+module_pci_driver(k10temp_driver);
index 575101988751061eb166f962e222b70ab386ae2f..35aac82ee8eb340e726e696a98ca34a156d76607 100644 (file)
@@ -339,19 +339,8 @@ static struct pci_driver k8temp_driver = {
        .remove = __devexit_p(k8temp_remove),
 };
 
-static int __init k8temp_init(void)
-{
-       return pci_register_driver(&k8temp_driver);
-}
-
-static void __exit k8temp_exit(void)
-{
-       pci_unregister_driver(&k8temp_driver);
-}
+module_pci_driver(k8temp_driver);
 
 MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>");
 MODULE_DESCRIPTION("AMD K8 core temperature monitor");
 MODULE_LICENSE("GPL");
-
-module_init(k8temp_init)
-module_exit(k8temp_exit)