Commit 9891b1ce authored by Marc Dietrich's avatar Marc Dietrich Committed by Greg Kroah-Hartman

staging: nvec: cleanup driver registration

This patch simplifies code by using the module_platform_driver
macro.
Signed-off-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50d4656a
...@@ -917,12 +917,7 @@ static struct platform_driver nvec_device_driver = { ...@@ -917,12 +917,7 @@ static struct platform_driver nvec_device_driver = {
} }
}; };
static int __init tegra_nvec_init(void) module_platform_driver(nvec_device_driver);
{
return platform_driver_register(&nvec_device_driver);
}
module_init(tegra_nvec_init);
MODULE_ALIAS("platform:nvec"); MODULE_ALIAS("platform:nvec");
MODULE_DESCRIPTION("NVIDIA compliant embedded controller interface"); MODULE_DESCRIPTION("NVIDIA compliant embedded controller interface");
......
...@@ -167,12 +167,7 @@ static struct platform_driver nvec_kbd_driver = { ...@@ -167,12 +167,7 @@ static struct platform_driver nvec_kbd_driver = {
}, },
}; };
static int __init nvec_kbd_init(void) module_platform_driver(nvec_kbd_driver);
{
return platform_driver_register(&nvec_kbd_driver);
}
module_init(nvec_kbd_init);
MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>"); MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
MODULE_DESCRIPTION("NVEC keyboard driver"); MODULE_DESCRIPTION("NVEC keyboard driver");
......
...@@ -90,19 +90,7 @@ static struct platform_driver nvec_led_driver = { ...@@ -90,19 +90,7 @@ static struct platform_driver nvec_led_driver = {
}, },
}; };
static int __init nvec_led_init(void) module_platform_driver(nvec_led_driver);
{
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_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>"); MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
MODULE_DESCRIPTION("Tegra NVEC LED driver"); MODULE_DESCRIPTION("Tegra NVEC LED driver");
......
...@@ -415,12 +415,7 @@ static struct platform_driver nvec_power_driver = { ...@@ -415,12 +415,7 @@ static struct platform_driver nvec_power_driver = {
} }
}; };
static int __init nvec_power_init(void) module_platform_driver(nvec_power_driver);
{
return platform_driver_register(&nvec_power_driver);
}
module_init(nvec_power_init);
MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>"); MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -158,12 +158,7 @@ static struct platform_driver nvec_mouse_driver = { ...@@ -158,12 +158,7 @@ static struct platform_driver nvec_mouse_driver = {
}, },
}; };
static int __init nvec_mouse_init(void) module_platform_driver(nvec_mouse_driver);
{
return platform_driver_register(&nvec_mouse_driver);
}
module_init(nvec_mouse_init);
MODULE_DESCRIPTION("NVEC mouse driver"); MODULE_DESCRIPTION("NVEC mouse driver");
MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>"); MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
......
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