net: dsa: mt7530: introduce mutex helpers
authorDaniel Golle <daniel@makrotopia.org>
Mon, 3 Apr 2023 01:18:16 +0000 (02:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2023 09:13:00 +0000 (10:13 +0100)
commit1557c679f71c82a994eae0baadbaeb62b71e15bf
tree7d2ce47e1a9c9ec9bc2958d622c97f829c188564
parent6de2852297737171ba96b91e89bf302ca1fda869
net: dsa: mt7530: introduce mutex helpers

As the MDIO bus lock only needs to be involved if actually operating
on an MDIO-connected switch we will need to skip locking for built-in
switches which are accessed via MMIO.
Create helper functions which simplify that upcoming change.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c