From 871d33725545ca2e402b4526f38f89d041ba930f Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 27 Nov 2011 15:42:31 +0000 Subject: net/can: convert drivers/net/can/* to use module_platform_driver() This patch converts the drivers in drivers/net/can/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Wolfgang Grandegger Cc: "David S. Miller" Cc: Bhupesh Sharma Cc: Jiri Kosina Cc: Grant Likely Cc: Anatolij Gustschin Cc: Paul Bolle Cc: Kurt Van Dijck Cc: Alexey Dobriyan Signed-off-by: Axel Lin Acked-by: Marc Kleine-Budde Signed-off-by: David S. Miller --- drivers/net/can/sja1000/sja1000_of_platform.c | 12 +----------- drivers/net/can/sja1000/sja1000_platform.c | 13 +------------ 2 files changed, 2 insertions(+), 23 deletions(-) (limited to 'drivers/net/can/sja1000') diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index c3dd9d09be57..f2683eb6a3d5 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c @@ -220,14 +220,4 @@ static struct platform_driver sja1000_ofp_driver = { .remove = __devexit_p(sja1000_ofp_remove), }; -static int __init sja1000_ofp_init(void) -{ - return platform_driver_register(&sja1000_ofp_driver); -} -module_init(sja1000_ofp_init); - -static void __exit sja1000_ofp_exit(void) -{ - return platform_driver_unregister(&sja1000_ofp_driver); -}; -module_exit(sja1000_ofp_exit); +module_platform_driver(sja1000_ofp_driver); diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c index d9fadc489b32..4f50145f6483 100644 --- a/drivers/net/can/sja1000/sja1000_platform.c +++ b/drivers/net/can/sja1000/sja1000_platform.c @@ -185,15 +185,4 @@ static struct platform_driver sp_driver = { }, }; -static int __init sp_init(void) -{ - return platform_driver_register(&sp_driver); -} - -static void __exit sp_exit(void) -{ - platform_driver_unregister(&sp_driver); -} - -module_init(sp_init); -module_exit(sp_exit); +module_platform_driver(sp_driver); -- cgit