OSDN Git Service

net: sfp: add helper to modify signal states
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 17 May 2023 10:37:47 +0000 (11:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 19 May 2023 02:52:31 +0000 (19:52 -0700)
commit418c1214741cf3ac5e420382a85c4f8a40586024
tree5d3e6fac5391ae6ce18acd0b23b7dcf92d4a1098
parent90223c1136b2930751116fb7de9675f55843f3ad
net: sfp: add helper to modify signal states

There are a couple of locations in the code where we modify
sfp->state, and then call sfp_set_state(, sfp->state) to update
the outputs/soft state to control the module. Provide a helper
which takes a mask and new state so that this is encapsulated in
one location.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c