summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/at91_can.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-27 15:42:31 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-29 00:25:05 -0500
commit871d33725545ca2e402b4526f38f89d041ba930f (patch)
treefb52710f1208db2a85d8080c38038c58804c8487 /drivers/net/can/at91_can.c
parent0f20f5a7de1ee48ced284e960828017cc2f5d52b (diff)
downloadlinux-871d33725545ca2e402b4526f38f89d041ba930f.tar.bz2
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 <wg@grandegger.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Bhupesh Sharma <bhupesh.sharma@st.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Anatolij Gustschin <agust@denx.de> Cc: Paul Bolle <pebolle@tiscali.nl> Cc: Kurt Van Dijck <kurt.van.dijck@eia.be> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/at91_can.c')
-rw-r--r--drivers/net/can/at91_can.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 044ea0647b04..6ea905c2cf6d 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -1383,18 +1383,7 @@ static struct platform_driver at91_can_driver = {
.id_table = at91_can_id_table,
};
-static int __init at91_can_module_init(void)
-{
- return platform_driver_register(&at91_can_driver);
-}
-
-static void __exit at91_can_module_exit(void)
-{
- platform_driver_unregister(&at91_can_driver);
-}
-
-module_init(at91_can_module_init);
-module_exit(at91_can_module_exit);
+module_platform_driver(at91_can_driver);
MODULE_AUTHOR("Marc Kleine-Budde <mkl@pengutronix.de>");
MODULE_LICENSE("GPL v2");