net: dsa: b53: Use a macro to define I/O operations
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 19 Sep 2017 17:46:47 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Sep 2017 23:08:53 +0000 (16:08 -0700)
commit5345862e9af02ce3780639bfe350ed2da9f8af13
treed0f4c250df93c70b9d664dab28435127705edffd
parente85ec74ace29acfda4afdfd56df122a0a62e6a1a
net: dsa: b53: Use a macro to define I/O operations

Instead of repeating the same pattern: acquire mutex, read/write,
release mutex, define a macro: b53_build_op() which takes the type
(read|write), I/O size, and value (scalar or pointer). This helps with
fixing bugs that could exist (e.g: missing barrier, lock etc.).

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_priv.h