net/irda: convert drivers/net/irda/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Mon, 28 Nov 2011 01:29:11 +0000 (20:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2011 01:29:11 +0000 (20:29 -0500)
This patch converts the drivers in drivers/net/irda/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/bfin_sir.c
drivers/net/irda/pxaficp_ir.c
drivers/net/irda/sh_irda.c
drivers/net/irda/sh_sir.c

index 9d4ce1aba10c1fdbc2ae6a8b1a20b40ee2134fb9..a561ae44a9ac1c982b1d5390a6f288abe0094523 100644 (file)
@@ -806,18 +806,7 @@ static struct platform_driver bfin_ir_driver = {
        },
 };
 
-static int __init bfin_sir_init(void)
-{
-       return platform_driver_register(&bfin_ir_driver);
-}
-
-static void __exit bfin_sir_exit(void)
-{
-       platform_driver_unregister(&bfin_ir_driver);
-}
-
-module_init(bfin_sir_init);
-module_exit(bfin_sir_exit);
+module_platform_driver(bfin_ir_driver);
 
 module_param(max_rate, int, 0);
 MODULE_PARM_DESC(max_rate, "Maximum baud rate (115200, 57600, 38400, 19200, 9600)");
index d0851dfa03780cd71a97633a5770ec2241baeb59..81d5275a15e298dc11a4208b00ffbbbf4cd1864b 100644 (file)
@@ -966,18 +966,7 @@ static struct platform_driver pxa_ir_driver = {
        .resume         = pxa_irda_resume,
 };
 
-static int __init pxa_irda_init(void)
-{
-       return platform_driver_register(&pxa_ir_driver);
-}
-
-static void __exit pxa_irda_exit(void)
-{
-       platform_driver_unregister(&pxa_ir_driver);
-}
-
-module_init(pxa_irda_init);
-module_exit(pxa_irda_exit);
+module_platform_driver(pxa_ir_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:pxa2xx-ir");
index d275e276e742a2234dc4d42c5df8647f09b49fa5..725d6b36782280b610dd5780e41d91b2561d3bd8 100644 (file)
@@ -873,18 +873,7 @@ static struct platform_driver sh_irda_driver = {
        },
 };
 
-static int __init sh_irda_init(void)
-{
-       return platform_driver_register(&sh_irda_driver);
-}
-
-static void __exit sh_irda_exit(void)
-{
-       platform_driver_unregister(&sh_irda_driver);
-}
-
-module_init(sh_irda_init);
-module_exit(sh_irda_exit);
+module_platform_driver(sh_irda_driver);
 
 MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
 MODULE_DESCRIPTION("SuperH IrDA driver");
index ed7d7d62bf68ddff78d657fa3d93d264434264a0..e6661b5c1f83643e9bcfd1bcbf6094be5bc00897 100644 (file)
@@ -808,18 +808,7 @@ static struct platform_driver sh_sir_driver = {
        },
 };
 
-static int __init sh_sir_init(void)
-{
-       return platform_driver_register(&sh_sir_driver);
-}
-
-static void __exit sh_sir_exit(void)
-{
-       platform_driver_unregister(&sh_sir_driver);
-}
-
-module_init(sh_sir_init);
-module_exit(sh_sir_exit);
+module_platform_driver(sh_sir_driver);
 
 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
 MODULE_DESCRIPTION("SuperH IrDA driver");