diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-14 22:32:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-14 22:32:15 -0500 |
commit | 80d11788fb8f4d9fcfae5ad508c7f1b65e8b28a3 (patch) | |
tree | 95bb41b7c8baa0332461c2e4a4b3400fee39934b | |
parent | 769ce4c95e8f77c1d5df82194e54df49d28830c5 (diff) |
Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free"
This reverts commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e.
As pointed out by Ben Hutchings, this change is not correct.
mdiobus_unregister() can't be called if the bus isn't registered yet,
however this change can result in situations which cause that to
happen.
Part of the confusion here revolves around the fact that the
callers of this module control registration/unregistration,
rather than the module itself.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mdio-bitbang.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 6428fcbbdd4b..daec9b05d168 100644 --- a/drivers/net/phy/mdio-bitbang.c +++ b/drivers/net/phy/mdio-bitbang.c | |||
@@ -234,7 +234,6 @@ void free_mdio_bitbang(struct mii_bus *bus) | |||
234 | struct mdiobb_ctrl *ctrl = bus->priv; | 234 | struct mdiobb_ctrl *ctrl = bus->priv; |
235 | 235 | ||
236 | module_put(ctrl->ops->owner); | 236 | module_put(ctrl->ops->owner); |
237 | mdiobus_unregister(bus); | ||
238 | mdiobus_free(bus); | 237 | mdiobus_free(bus); |
239 | } | 238 | } |
240 | EXPORT_SYMBOL(free_mdio_bitbang); | 239 | EXPORT_SYMBOL(free_mdio_bitbang); |