Commit c8381c15 authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman

TTY: serial: convert drivers/tty/serial/* to use module_platform_driver()

This patch converts the drivers in drivers/tty/serial/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 782ee877
...@@ -177,17 +177,7 @@ static struct platform_driver dw8250_platform_driver = { ...@@ -177,17 +177,7 @@ static struct platform_driver dw8250_platform_driver = {
.remove = __devexit_p(dw8250_remove), .remove = __devexit_p(dw8250_remove),
}; };
static int __init dw8250_init(void) module_platform_driver(dw8250_platform_driver);
{
return platform_driver_register(&dw8250_platform_driver);
}
module_init(dw8250_init);
static void __exit dw8250_exit(void)
{
platform_driver_unregister(&dw8250_platform_driver);
}
module_exit(dw8250_exit);
MODULE_AUTHOR("Jamie Iles"); MODULE_AUTHOR("Jamie Iles");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -736,19 +736,7 @@ static struct platform_driver sc26xx_driver = { ...@@ -736,19 +736,7 @@ static struct platform_driver sc26xx_driver = {
}, },
}; };
static int __init sc26xx_init(void) module_platform_driver(sc26xx_driver);
{
return platform_driver_register(&sc26xx_driver);
}
static void __exit sc26xx_exit(void)
{
platform_driver_unregister(&sc26xx_driver);
}
module_init(sc26xx_init);
module_exit(sc26xx_exit);
MODULE_AUTHOR("Thomas Bogendörfer"); MODULE_AUTHOR("Thomas Bogendörfer");
MODULE_DESCRIPTION("SC681/SC2692 serial driver"); MODULE_DESCRIPTION("SC681/SC2692 serial driver");
......
...@@ -513,20 +513,7 @@ static struct platform_driver timbuart_platform_driver = { ...@@ -513,20 +513,7 @@ static struct platform_driver timbuart_platform_driver = {
.remove = __devexit_p(timbuart_remove), .remove = __devexit_p(timbuart_remove),
}; };
/*--------------------------------------------------------------------------*/ module_platform_driver(timbuart_platform_driver);
static int __init timbuart_init(void)
{
return platform_driver_register(&timbuart_platform_driver);
}
static void __exit timbuart_exit(void)
{
platform_driver_unregister(&timbuart_platform_driver);
}
module_init(timbuart_init);
module_exit(timbuart_exit);
MODULE_DESCRIPTION("Timberdale UART driver"); MODULE_DESCRIPTION("Timberdale UART driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
......
...@@ -961,18 +961,7 @@ static struct platform_driver siu_device_driver = { ...@@ -961,18 +961,7 @@ static struct platform_driver siu_device_driver = {
}, },
}; };
static int __init vr41xx_siu_init(void) module_platform_driver(siu_device_driver);
{
return platform_driver_register(&siu_device_driver);
}
static void __exit vr41xx_siu_exit(void)
{
platform_driver_unregister(&siu_device_driver);
}
module_init(vr41xx_siu_init);
module_exit(vr41xx_siu_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:SIU"); MODULE_ALIAS("platform:SIU");
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