net: sfp: rework upstream interface
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 8 Nov 2019 17:39:29 +0000 (17:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Nov 2019 03:35:53 +0000 (19:35 -0800)
commit727b3668b730634228fc65c336c2a7a080e02885
tree061758f9f98b33a681b4d564a2035fd1d361e7e4
parent14684b93019a2d2ece0df5acaf921924541b928d
net: sfp: rework upstream interface

The current upstream interface is an all-or-nothing, which is
sub-optimal for future changes, as it doesn't allow the upstream driver
to prepare for the SFP module becoming available, as it is at boot.

Switch to a find-sfp-bus, add-upstream, del-upstream, put-sfp-bus
interface structure instead, which allows the upstream driver to
prepare for a module being available as soon as add-upstream is called.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
drivers/net/phy/sfp-bus.c
include/linux/sfp.h