From: Tao Ren Date: Thu, 18 Jun 2020 22:04:44 +0000 (-0700) Subject: of: mdio: preserve phy dev_flags in of_phy_connect() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=902053f17dbeff125926bb07e781f6e63f3efe09;p=linux.git of: mdio: preserve phy dev_flags in of_phy_connect() Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" configured in phy probe() function can be preserved. The idea is similar to commit e7312efbd5de ("net: phy: modify assignment to OR for dev_flags in phy_attach_direct"). Signed-off-by: Tao Ren Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index a04afe79529ca..f5c46c72f4d37 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -380,7 +380,7 @@ struct phy_device *of_phy_connect(struct net_device *dev, if (!phy) return NULL; - phy->dev_flags = flags; + phy->dev_flags |= flags; ret = phy_connect_direct(dev, phy, hndlr, iface);