diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2019-06-20 15:50:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-23 20:11:11 +0200 |
commit | c9acece064e3f0042c50162d3405759243225dd6 (patch) | |
tree | e9945d5733e3a9681445f56eaf955719e9ca14b0 /drivers/net/dsa/mv88e6xxx/phy.c | |
parent | net: ena: Fix bug where ring allocation backoff stopped too late (diff) | |
download | linux-c9acece064e3f0042c50162d3405759243225dd6.tar.xz linux-c9acece064e3f0042c50162d3405759243225dd6.zip |
net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock
This is a no-op that simply moves all locking and unlocking of
->reg_lock into trivial helpers. I did that to be able to easily add
some ad hoc instrumentation to those helpers to get some information
on contention and hold times of the mutex. Perhaps others want to do
something similar at some point, so this frees them from doing the
'sed -i' yoga, and have a much smaller 'git diff' while fiddling.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/phy.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/phy.c b/drivers/net/dsa/mv88e6xxx/phy.c index 2952db73f55c..252b5b3a3efe 100644 --- a/drivers/net/dsa/mv88e6xxx/phy.c +++ b/drivers/net/dsa/mv88e6xxx/phy.c @@ -137,7 +137,7 @@ static void mv88e6xxx_phy_ppu_reenable_work(struct work_struct *ugly) chip = container_of(ugly, struct mv88e6xxx_chip, ppu_work); - mutex_lock(&chip->reg_lock); + mv88e6xxx_reg_lock(chip); if (mutex_trylock(&chip->ppu_mutex)) { if (mv88e6xxx_phy_ppu_enable(chip) == 0) @@ -145,7 +145,7 @@ static void mv88e6xxx_phy_ppu_reenable_work(struct work_struct *ugly) mutex_unlock(&chip->ppu_mutex); } - mutex_unlock(&chip->reg_lock); + mv88e6xxx_reg_unlock(chip); } static void mv88e6xxx_phy_ppu_reenable_timer(struct timer_list *t) |