diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-07-18 11:24:41 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-07-18 11:25:55 +0200 |
commit | eec19d1a0d04c80e66eef634f7b8f460f2ca5643 (patch) | |
tree | e68f24938d458fc776b76dc6037f9a2d03f09403 /drivers/net/phy/mdio-mux.c | |
parent | f726a697d06102e7a1fc0a87308cb30a84580205 (diff) | |
parent | a018540141a931f5299a866907b27886916b4374 (diff) |
Merge branch 'linus' into timers/core
Resolve semantic conflict in kernel/time/timekeeping.c.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/phy/mdio-mux.c')
-rw-r--r-- | drivers/net/phy/mdio-mux.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 39ea0674dcd..5c120189ec8 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c @@ -46,7 +46,13 @@ static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) struct mdio_mux_parent_bus *pb = cb->parent; int r; - mutex_lock(&pb->mii_bus->mdio_lock); + /* In theory multiple mdio_mux could be stacked, thus creating + * more than a single level of nesting. But in practice, + * SINGLE_DEPTH_NESTING will cover the vast majority of use + * cases. We use it, instead of trying to handle the general + * case. + */ + mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); r = pb->switch_fn(pb->current_child, cb->bus_number, pb->switch_data); if (r) goto out; @@ -71,7 +77,7 @@ static int mdio_mux_write(struct mii_bus *bus, int phy_id, int r; - mutex_lock(&pb->mii_bus->mdio_lock); + mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); r = pb->switch_fn(pb->current_child, cb->bus_number, pb->switch_data); if (r) goto out; |