diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2015-10-23 14:41:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-23 05:48:09 -0700 |
commit | 6fb3b6b57ae444d7723088656dce86b1be92498d (patch) | |
tree | 36393d2fccbd42f05ab789ade0b12d25e3e96753 /drivers/net/ethernet/ti | |
parent | 5e0724d027f0548511a2165a209572d48fe7a4c8 (diff) | |
download | linux-6fb3b6b57ae444d7723088656dce86b1be92498d.tar.bz2 |
drivers: net: cpsw: use module_platform_driver
There is no reasons to probe cpsw from late_initcall level
and it's not recommended. Hence, use module_platform_driver()
to register and probe cpsw driver from module_init() level.
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 3b75adfb3f37..55d2d8577d07 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2583,17 +2583,7 @@ static struct platform_driver cpsw_driver = { .remove = cpsw_remove, }; -static int __init cpsw_init(void) -{ - return platform_driver_register(&cpsw_driver); -} -late_initcall(cpsw_init); - -static void __exit cpsw_exit(void) -{ - platform_driver_unregister(&cpsw_driver); -} -module_exit(cpsw_exit); +module_platform_driver(cpsw_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Cyril Chemparathy <cyril@ti.com>"); |