staging: nvec: cleanup driver registration
authorMarc Dietrich <marvin24@gmx.de>
Sun, 24 Jun 2012 21:25:18 +0000 (23:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jun 2012 17:55:37 +0000 (10:55 -0700)
This patch simplifies code by using the module_platform_driver
macro.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/nvec/nvec.c
drivers/staging/nvec/nvec_kbd.c
drivers/staging/nvec/nvec_leds.c
drivers/staging/nvec/nvec_power.c
drivers/staging/nvec/nvec_ps2.c

index 39dbaa0ac6a08178f7bdd65e7b776a42e3d7e57e..09b7e129fc2741da9d7347e769071541fb56b7bf 100644 (file)
@@ -917,12 +917,7 @@ static struct platform_driver nvec_device_driver = {
        }
 };
 
-static int __init tegra_nvec_init(void)
-{
-       return platform_driver_register(&nvec_device_driver);
-}
-
-module_init(tegra_nvec_init);
+module_platform_driver(nvec_device_driver);
 
 MODULE_ALIAS("platform:nvec");
 MODULE_DESCRIPTION("NVIDIA compliant embedded controller interface");
index a4ce5a740e2b1d49ae2e82a6d3df4e1458ce946e..36ef6a6b01af98a4b8a941ce63e2494441b06a13 100644 (file)
@@ -167,12 +167,7 @@ static struct platform_driver nvec_kbd_driver = {
        },
 };
 
-static int __init nvec_kbd_init(void)
-{
-       return platform_driver_register(&nvec_kbd_driver);
-}
-
-module_init(nvec_kbd_init);
+module_platform_driver(nvec_kbd_driver);
 
 MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
 MODULE_DESCRIPTION("NVEC keyboard driver");
index 91947fb860679e3233c3d741806ea82847072413..53cb5711afa6be27db68be0b4b18c643ecaa0c0d 100644 (file)
@@ -90,19 +90,7 @@ static struct platform_driver nvec_led_driver = {
        },
 };
 
-static int __init nvec_led_init(void)
-{
-       return platform_driver_register(&nvec_led_driver);
-}
-
-module_init(nvec_led_init);
-
-static void __exit nvec_led_exit(void)
-{
-       platform_driver_unregister(&nvec_led_driver);
-}
-
-module_exit(nvec_led_exit);
+module_platform_driver(nvec_led_driver);
 
 MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
 MODULE_DESCRIPTION("Tegra NVEC LED driver");
index a23e5485c2793284ff987018ea4b617d1ce89ced..063f6d5e8ab1f94101bf146943e7f18d14ab8a84 100644 (file)
@@ -415,12 +415,7 @@ static struct platform_driver nvec_power_driver = {
                   }
 };
 
-static int __init nvec_power_init(void)
-{
-       return platform_driver_register(&nvec_power_driver);
-}
-
-module_init(nvec_power_init);
+module_platform_driver(nvec_power_driver);
 
 MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
 MODULE_LICENSE("GPL");
index d6ceff93d8b649a62e054673ced407f0bd29851c..441dd76f10a115c833c7939146b7dc7711937fa9 100644 (file)
@@ -158,12 +158,7 @@ static struct platform_driver nvec_mouse_driver = {
        },
 };
 
-static int __init nvec_mouse_init(void)
-{
-       return platform_driver_register(&nvec_mouse_driver);
-}
-
-module_init(nvec_mouse_init);
+module_platform_driver(nvec_mouse_driver);
 
 MODULE_DESCRIPTION("NVEC mouse driver");
 MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");