net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 20 Jun 2019 13:50:42 +0000 (13:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jun 2019 18:11:11 +0000 (11:11 -0700)
commitc9acece064e3f0042c50162d3405759243225dd6
treee9945d5733e3a9681445f56eaf955719e9ca14b0
parent3e5bfb189e1a65df132fd0e3fa00fbb6feec1431
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>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/global1_atu.c
drivers/net/dsa/mv88e6xxx/global1_vtu.c
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/dsa/mv88e6xxx/hwtstamp.c
drivers/net/dsa/mv88e6xxx/phy.c
drivers/net/dsa/mv88e6xxx/ptp.c
drivers/net/dsa/mv88e6xxx/serdes.c