net: phy: modify assignment to OR for dev_flags in phy_attach_direct
Subsystems (3)
PATCH 1/1 net: phy: modify assignment to OR for dev_flags in phy_attach_direct
Modify the assignment to OR when dealing with phydev->dev_flags in phy_attach_direct function, and this is to make sure dev_flags set in driver's probe callback won't be lost.
Suggested-by Andrew Lunn <[email protected]>
CC Heiner Kallweit <[email protected]>
CC Vladimir Oltean <[email protected]>
Signed-off-by Tao Ren <[email protected]>
--- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/phy_device.c +1 -1
@@ -1270,7 +1270,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,phydev_err (phydev,"error creating 'phy_standalone' sysfs entry\n" ); } - phydev->dev_flags = flags; + phydev->dev_flags |= flags; phydev->interface = interface;
Signature · 1 line
2.17.1
Quoted 8 lines · Tao Ren
Modify the assignment to OR when dealing with
phydev->dev_flagsinphy_attach_directfunction, and this is to make suredev_flagsset in driver's probe callback won't be lost.Suggested-by Andrew Lunn <[email protected]>CC Heiner Kallweit <[email protected]>CC Vladimir Oltean <[email protected]>Signed-off-by Tao Ren <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
Quoted 3 lines · Tao Ren
Modify the assignment to OR when dealing with
phydev->dev_flagsinphy_attach_directfunction, and this is to make suredev_flagsset in driver's probe callback won't be lost.
As Andrew pointed out already, this probably needs to be reworked, but for now this looks reasonable:
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian