net: dsa: lan9303: Introduce lan9303_read_wait
authorEgil Hjelmeland <privat@egil-hjelmeland.no>
Wed, 13 Dec 2017 14:42:50 +0000 (15:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 21:25:34 +0000 (16:25 -0500)
commit5c13e07580c8bd2af6aa902d6b62faa968c360bc
tree0bad4b4c7c484df859f35d64e02622a276ceba20
parentf4d87ad2a3b875ca103be75e213f18f27fe089f7
net: dsa: lan9303: Introduce lan9303_read_wait

Simplify lan9303_indirect_phy_wait_for_completion()
and lan9303_switch_wait_for_completion() by using a new function
lan9303_read_wait()

Changes v1 -> v2:
 - param 'mask' type u32
 - removed param 'value' (will probably never be used)
 - add newline before return

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c