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]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Tao Ren
2019-10-23 20:42:52 -07:00
committed by David S. Miller
parent 406715df93
commit e7312efbd5
+1 -1
View File
@@ -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;