[PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct

From: Tao Ren
Date: Mon Aug 05 2019 - 14:59:07 EST


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 <andrew@xxxxxxx>
CC: Heiner Kallweit <hkallweit1@xxxxxxxxx>
CC: Vladimir Oltean <olteanv@xxxxxxxxx>
Signed-off-by: Tao Ren <taoren@xxxxxx>
---
drivers/net/phy/phy_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 6b5cb87f3866..9259eb45c794 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -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;

--
2.17.1