diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 044ea0647b045206bc0f7f0ed6123c273232c665..6ea905c2cf6d1f030dd0893f0a1097e1d5aef03f 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 "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index a1c5abc38cd26b9591083ef467a4b73ea67883ea..349e0fabb63abb8b589d49dceab652a73a52aca5 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c @@ -676,17 +676,7 @@ static struct platform_driver bfin_can_driver = { }, }; -static int __init bfin_can_init(void) -{ - return platform_driver_register(&bfin_can_driver); -} -module_init(bfin_can_init); - -static void __exit bfin_can_exit(void) -{ - platform_driver_unregister(&bfin_can_driver); -} -module_exit(bfin_can_exit); +module_platform_driver(bfin_can_driver); MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>"); MODULE_LICENSE("GPL"); diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 0b5c6f8bdd347e2285a1fd68957114bed0fdc1a0..5e1a5ff6476ef0919e029640cb8890b78c2b55ab 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -197,17 +197,7 @@ static struct platform_driver c_can_plat_driver = { .remove = __devexit_p(c_can_plat_remove), }; -static int __init c_can_plat_init(void) -{ - return platform_driver_register(&c_can_plat_driver); -} -module_init(c_can_plat_init); - -static void __exit c_can_plat_exit(void) -{ - platform_driver_unregister(&c_can_plat_driver); -} -module_exit(c_can_plat_exit); +module_platform_driver(c_can_plat_driver); MODULE_AUTHOR("Bhupesh Sharma "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index e02337953f41b93b3c8f8e300e26adef196ef6f6..165a4c79802515123dd64375a4a0952a179b205b 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -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 , " "Marc Kleine-Budde "); diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 32778d56d3306e57d08d735925305e262bd074da..08c893cb7896a9e97e5bc920f0f65613b33e24f6 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c @@ -1803,20 +1803,9 @@ static struct platform_driver ican3_driver = { .remove = __devexit_p(ican3_remove), }; -static int __init ican3_init(void) -{ - return platform_driver_register(&ican3_driver); -} - -static void __exit ican3_exit(void) -{ - platform_driver_unregister(&ican3_driver); -} +module_platform_driver(ican3_driver); MODULE_AUTHOR("Ira W. Snyder "); MODULE_DESCRIPTION("Janz MODULbus VMOD-ICAN3 Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:janz-ican3"); - -module_init(ican3_init); -module_exit(ican3_exit); diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 5fedc3375562316c3e13f0a9a7ff4b94854c9c34..5caa572d71e3bbf2babd6c9e918950dd159765ce 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -411,17 +411,7 @@ static struct platform_driver mpc5xxx_can_driver = { #endif }; -static int __init mpc5xxx_can_init(void) -{ - return platform_driver_register(&mpc5xxx_can_driver); -} -module_init(mpc5xxx_can_init); - -static void __exit mpc5xxx_can_exit(void) -{ - platform_driver_unregister(&mpc5xxx_can_driver); -}; -module_exit(mpc5xxx_can_exit); +module_platform_driver(mpc5xxx_can_driver); MODULE_AUTHOR("Wolfgang Grandegger "); MODULE_DESCRIPTION("Freescale MPC5xxx CAN driver"); diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index c3dd9d09be572b0ff165edc3a28102935839b418..f2683eb6a3d588a7dff7af9f8830a79dc18206c7 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 d9fadc489b32dc75f09c0d55d63b9e85b90f143c..4f50145f64839f519c232d0e4ec79e7fedf2bd34 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); diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 09a8b86cf1ac314819a5e386bf3500bea76ec9e5..a7c77c744ee9150d506fcfcb891bc7ac719606e6 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -874,21 +874,9 @@ static struct platform_driver softing_driver = { .remove = __devexit_p(softing_pdev_remove), }; -MODULE_ALIAS("platform:softing"); - -static int __init softing_start(void) -{ - return platform_driver_register(&softing_driver); -} - -static void __exit softing_stop(void) -{ - platform_driver_unregister(&softing_driver); -} - -module_init(softing_start); -module_exit(softing_stop); +module_platform_driver(softing_driver); +MODULE_ALIAS("platform:softing"); MODULE_DESCRIPTION("Softing DPRAM CAN driver"); MODULE_AUTHOR("Kurt Van Dijck "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 2adc294f512a8c0add1ba99c49660b0a48a5bd7d..df809e3f130eed15f952323d0291ba6daa1661b8 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -1037,20 +1037,7 @@ static struct platform_driver ti_hecc_driver = { .resume = ti_hecc_resume, }; -static int __init ti_hecc_init_driver(void) -{ - printk(KERN_INFO DRV_DESC "\n"); - return platform_driver_register(&ti_hecc_driver); -} - -static void __exit ti_hecc_exit_driver(void) -{ - printk(KERN_INFO DRV_DESC " unloaded\n"); - platform_driver_unregister(&ti_hecc_driver); -} - -module_exit(ti_hecc_exit_driver); -module_init(ti_hecc_init_driver); +module_platform_driver(ti_hecc_driver); MODULE_AUTHOR("Anant Gole "); MODULE_LICENSE("GPL v2");