aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-27 20:29:11 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-27 20:29:11 -0500
commit8b7ff200010600ef7cd9d002f9f8f97edfc7578e (patch)
tree4b3f52568d0b7ffcca9922be979ac4c65be4de5b
parent8cd6d6162d998da579d40a1ee061bf8ce1610ff8 (diff)
net/irda: convert drivers/net/irda/* to use module_platform_driver()
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>
-rw-r--r--drivers/net/irda/bfin_sir.c13
-rw-r--r--drivers/net/irda/pxaficp_ir.c13
-rw-r--r--drivers/net/irda/sh_irda.c13
-rw-r--r--drivers/net/irda/sh_sir.c13
4 files changed, 4 insertions, 48 deletions
diff --git a/drivers/net/irda/bfin_sir.c b/drivers/net/irda/bfin_sir.c
index 9d4ce1aba10c..a561ae44a9ac 100644
--- a/drivers/net/irda/bfin_sir.c
+++ b/drivers/net/irda/bfin_sir.c
@@ -806,18 +806,7 @@ static struct platform_driver bfin_ir_driver = {
806 }, 806 },
807}; 807};
808 808
809static int __init bfin_sir_init(void) 809module_platform_driver(bfin_ir_driver);
810{
811 return platform_driver_register(&bfin_ir_driver);
812}
813
814static void __exit bfin_sir_exit(void)
815{
816 platform_driver_unregister(&bfin_ir_driver);
817}
818
819module_init(bfin_sir_init);
820module_exit(bfin_sir_exit);
821 810
822module_param(max_rate, int, 0); 811module_param(max_rate, int, 0);
823MODULE_PARM_DESC(max_rate, "Maximum baud rate (115200, 57600, 38400, 19200, 9600)"); 812MODULE_PARM_DESC(max_rate, "Maximum baud rate (115200, 57600, 38400, 19200, 9600)");
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index d0851dfa0378..81d5275a15e2 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -966,18 +966,7 @@ static struct platform_driver pxa_ir_driver = {
966 .resume = pxa_irda_resume, 966 .resume = pxa_irda_resume,
967}; 967};
968 968
969static int __init pxa_irda_init(void) 969module_platform_driver(pxa_ir_driver);
970{
971 return platform_driver_register(&pxa_ir_driver);
972}
973
974static void __exit pxa_irda_exit(void)
975{
976 platform_driver_unregister(&pxa_ir_driver);
977}
978
979module_init(pxa_irda_init);
980module_exit(pxa_irda_exit);
981 970
982MODULE_LICENSE("GPL"); 971MODULE_LICENSE("GPL");
983MODULE_ALIAS("platform:pxa2xx-ir"); 972MODULE_ALIAS("platform:pxa2xx-ir");
diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
index d275e276e742..725d6b367822 100644
--- a/drivers/net/irda/sh_irda.c
+++ b/drivers/net/irda/sh_irda.c
@@ -873,18 +873,7 @@ static struct platform_driver sh_irda_driver = {
873 }, 873 },
874}; 874};
875 875
876static int __init sh_irda_init(void) 876module_platform_driver(sh_irda_driver);
877{
878 return platform_driver_register(&sh_irda_driver);
879}
880
881static void __exit sh_irda_exit(void)
882{
883 platform_driver_unregister(&sh_irda_driver);
884}
885
886module_init(sh_irda_init);
887module_exit(sh_irda_exit);
888 877
889MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); 878MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
890MODULE_DESCRIPTION("SuperH IrDA driver"); 879MODULE_DESCRIPTION("SuperH IrDA driver");
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index ed7d7d62bf68..e6661b5c1f83 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -808,18 +808,7 @@ static struct platform_driver sh_sir_driver = {
808 }, 808 },
809}; 809};
810 810
811static int __init sh_sir_init(void) 811module_platform_driver(sh_sir_driver);
812{
813 return platform_driver_register(&sh_sir_driver);
814}
815
816static void __exit sh_sir_exit(void)
817{
818 platform_driver_unregister(&sh_sir_driver);
819}
820
821module_init(sh_sir_init);
822module_exit(sh_sir_exit);
823 812
824MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); 813MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
825MODULE_DESCRIPTION("SuperH IrDA driver"); 814MODULE_DESCRIPTION("SuperH IrDA driver");