TTY: amiserial, use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 03:29:20 +0000 (12:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 20:55:23 +0000 (13:55 -0700)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/amiserial.c

index fc700342d43fa7cdea3999d6aea8da6fc0a5638a..083710e02367de4186a457084979eef639bf6566 100644 (file)
@@ -1798,19 +1798,7 @@ static struct platform_driver amiga_serial_driver = {
        },
 };
 
-static int __init amiga_serial_init(void)
-{
-       return platform_driver_probe(&amiga_serial_driver, amiga_serial_probe);
-}
-
-module_init(amiga_serial_init);
-
-static void __exit amiga_serial_exit(void)
-{
-       platform_driver_unregister(&amiga_serial_driver);
-}
-
-module_exit(amiga_serial_exit);
+module_platform_driver_probe(amiga_serial_driver, amiga_serial_probe);
 
 
 #if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)