sfc: Fix synchronisation of efx_mtd_{probe,rename,remove}
authorBen Hutchings <bhutchings@solarflare.com>
Sat, 13 Dec 2008 06:09:38 +0000 (22:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Dec 2008 06:09:38 +0000 (22:09 -0800)
commit7dde596ef79982327d8992a579a137b4035ad599
treed14cc58d0ea48dbece0f18b3c6823176969ecd74
parent0c53d8c84047d86169bd4147bb8f5adf2772d2bb
sfc: Fix synchronisation of efx_mtd_{probe,rename,remove}

Currently efx_mtd_rename() can race with the probe() and remove()
functions.

Move probe() before device registration and remove() after
unregistration.  Move initialisation/update of all names based on the
netdev name into a new function and call it under the RTNL immediately
after registration.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/efx.c