diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-27 20:29:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-27 20:29:11 -0500 |
commit | 8b7ff200010600ef7cd9d002f9f8f97edfc7578e (patch) | |
tree | 4b3f52568d0b7ffcca9922be979ac4c65be4de5b /drivers/net | |
parent | 8cd6d6162d998da579d40a1ee061bf8ce1610ff8 (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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/irda/bfin_sir.c | 13 | ||||
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 13 | ||||
-rw-r--r-- | drivers/net/irda/sh_irda.c | 13 | ||||
-rw-r--r-- | drivers/net/irda/sh_sir.c | 13 |
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 | ||
809 | static int __init bfin_sir_init(void) | 809 | module_platform_driver(bfin_ir_driver); |
810 | { | ||
811 | return platform_driver_register(&bfin_ir_driver); | ||
812 | } | ||
813 | |||
814 | static void __exit bfin_sir_exit(void) | ||
815 | { | ||
816 | platform_driver_unregister(&bfin_ir_driver); | ||
817 | } | ||
818 | |||
819 | module_init(bfin_sir_init); | ||
820 | module_exit(bfin_sir_exit); | ||
821 | 810 | ||
822 | module_param(max_rate, int, 0); | 811 | module_param(max_rate, int, 0); |
823 | MODULE_PARM_DESC(max_rate, "Maximum baud rate (115200, 57600, 38400, 19200, 9600)"); | 812 | MODULE_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 | ||
969 | static int __init pxa_irda_init(void) | 969 | module_platform_driver(pxa_ir_driver); |
970 | { | ||
971 | return platform_driver_register(&pxa_ir_driver); | ||
972 | } | ||
973 | |||
974 | static void __exit pxa_irda_exit(void) | ||
975 | { | ||
976 | platform_driver_unregister(&pxa_ir_driver); | ||
977 | } | ||
978 | |||
979 | module_init(pxa_irda_init); | ||
980 | module_exit(pxa_irda_exit); | ||
981 | 970 | ||
982 | MODULE_LICENSE("GPL"); | 971 | MODULE_LICENSE("GPL"); |
983 | MODULE_ALIAS("platform:pxa2xx-ir"); | 972 | MODULE_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 | ||
876 | static int __init sh_irda_init(void) | 876 | module_platform_driver(sh_irda_driver); |
877 | { | ||
878 | return platform_driver_register(&sh_irda_driver); | ||
879 | } | ||
880 | |||
881 | static void __exit sh_irda_exit(void) | ||
882 | { | ||
883 | platform_driver_unregister(&sh_irda_driver); | ||
884 | } | ||
885 | |||
886 | module_init(sh_irda_init); | ||
887 | module_exit(sh_irda_exit); | ||
888 | 877 | ||
889 | MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); | 878 | MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); |
890 | MODULE_DESCRIPTION("SuperH IrDA driver"); | 879 | MODULE_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 | ||
811 | static int __init sh_sir_init(void) | 811 | module_platform_driver(sh_sir_driver); |
812 | { | ||
813 | return platform_driver_register(&sh_sir_driver); | ||
814 | } | ||
815 | |||
816 | static void __exit sh_sir_exit(void) | ||
817 | { | ||
818 | platform_driver_unregister(&sh_sir_driver); | ||
819 | } | ||
820 | |||
821 | module_init(sh_sir_init); | ||
822 | module_exit(sh_sir_exit); | ||
823 | 812 | ||
824 | MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); | 813 | MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); |
825 | MODULE_DESCRIPTION("SuperH IrDA driver"); | 814 | MODULE_DESCRIPTION("SuperH IrDA driver"); |