Skip to contentSkip to conversation

net: phy: modify assignment to OR for dev_flags in phy_attach_direct

PATCH Superseded Tao Ren 1 participant 1 message Aug 6, 2019

Subsystems (2)

v4 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Tao Ren

author
#0 lore raw

PATCH v4 1/2 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.

CC Heiner Kallweit <[email protected]>
CC Vladimir Oltean <[email protected]>

---
Changes:
- nothing is changed in v1/v2/v3: it's given v4 to align with v4 of the 2nd patch in the series.

 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/phy_device.c +1 -1
index 6b5cb87f3866..9259eb45c794 100644
@@ -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