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>
This commit is contained in:
Axel Lin
2011-11-27 15:42:31 +00:00
committed by David S. Miller
parent 0f20f5a7de
commit 871d337255
10 changed files with 11 additions and 122 deletions

View File

@@ -1060,20 +1060,7 @@ static struct platform_driver flexcan_driver = {
.remove = __devexit_p(flexcan_remove),
};
static int __init flexcan_init(void)
{
pr_info("%s netdevice driver\n", DRV_NAME);
return platform_driver_register(&flexcan_driver);
}
static void __exit flexcan_exit(void)
{
platform_driver_unregister(&flexcan_driver);
pr_info("%s: driver removed\n", DRV_NAME);
}
module_init(flexcan_init);
module_exit(flexcan_exit);
module_platform_driver(flexcan_driver);
MODULE_AUTHOR("Sascha Hauer <kernel@pengutronix.de>, "
"Marc Kleine-Budde <kernel@pengutronix.de>");