From: Grygorii Strashko Date: Fri, 23 Oct 2015 11:41:12 +0000 (+0300) Subject: drivers: net: cpsw: use module_platform_driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6fb3b6b57ae444d7723088656dce86b1be92498d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Mugunthan V N Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller --- 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 ");