parport: amiga: use module_platform_driver_probe()
authorFabio Porcedda <fabio.porcedda@gmail.com>
Fri, 15 Mar 2013 10:49:27 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 17:42:06 +0000 (10:42 -0700)
Use module_platform_driver_probe() macro which makes the code smaller
and simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Matt Porter <mporter@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/parport_amiga.c

index ee78e0ee6e055edf278da9bb9ead1eb73a1479c7..09503b8d12e667f18109a7ba3595a327c8809737 100644 (file)
@@ -244,20 +244,7 @@ static struct platform_driver amiga_parallel_driver = {
        },
 };
 
-static int __init amiga_parallel_init(void)
-{
-       return platform_driver_probe(&amiga_parallel_driver,
-                                    amiga_parallel_probe);
-}
-
-module_init(amiga_parallel_init);
-
-static void __exit amiga_parallel_exit(void)
-{
-       platform_driver_unregister(&amiga_parallel_driver);
-}
-
-module_exit(amiga_parallel_exit);
+module_platform_driver_probe(amiga_parallel_driver, amiga_parallel_probe);
 
 MODULE_AUTHOR("Joerg Dorchain <joerg@dorchain.net>");
 MODULE_DESCRIPTION("Parport Driver for Amiga builtin Port");