drivers: net: ethernet: cpsw: dual emac remove module kernel crash bug fix
authorMugunthan V N <mugunthanvnm@ti.com>
Wed, 18 Jul 2012 10:47:33 +0000 (16:17 +0530)
committerVishveshwar Bhat <vishveshwar.bhat@ti.com>
Thu, 19 Jul 2012 05:33:55 +0000 (11:03 +0530)
commit5f6959a215428a42f1ee7cfa5ee6c0f7cdaf73e0
treea4e313a07587e07f3df8b598653f2030fbb4bab6
parentd9c3ba3f3152da8a0e356ed556b332c192a969e7
drivers: net: ethernet: cpsw: dual emac remove module kernel crash bug fix

In dual emac, while removing the ti_cpsw module leads to kernel crash as the
second network interface created is not unregistered and freed. Adding support
to unregister and free the second network interface.

Do not set the second network interface to platform driver data as there is no
separate device for second network interface, so that in cpsw_remove() the
platform device received corresponds to the first network interface all the
time.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
drivers/net/ethernet/ti/cpsw.c