drivers: net: cpsw: use of_platform_depopulate()
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 28 Jul 2016 17:50:36 +0000 (20:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 04:00:33 +0000 (21:00 -0700)
commit3bf2cb3ab585bd9ef1e46d3f89619bb33f2391de
treeda0841b00fafe6cad28e61d0fda024f315539789
parent8a0b6dc958fd1037931b0e01ebf266fbe3c09e92
drivers: net: cpsw: use of_platform_depopulate()

Use of_platform_depopulate() in cpsw_remove() instead of
of_device_unregister(), because CSPW child devices will not be
recreated otherwise on next insmod. of_platform_depopulate() is
correct way now as it will ensure that all steps done in
of_platform_populate() are reverted, including cleaning up of
OF_POPULATED flag.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c