]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drivers: net: cpsw: use module_platform_driver
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 23 Oct 2015 11:41:12 +0000 (14:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Oct 2015 12:48:09 +0000 (05:48 -0700)
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>
drivers/net/ethernet/ti/cpsw.c

index 3b75adfb3f379e4c89c560d18a2eee39f75f7e65..55d2d8577d075719cc28e61430bbb1414e3750c8 100644 (file)
@@ -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>");