net: phy: don't touch suspended flag if there's no suspend/resume callback
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 26 Mar 2020 17:58:24 +0000 (18:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 03:29:51 +0000 (20:29 -0700)
commit8a8f8281e7e7a838b015276cce0443e319c5ebd6
tree0e1f16a03c59ba56b65299849646417da8721c9c
parent05cc6c5b6d2c1974d3b28b6c3708d7124b1eaa1f
net: phy: don't touch suspended flag if there's no suspend/resume callback

So far we set phydev->suspended to true in phy_suspend() even if the
PHY driver doesn't implement the suspend callback. This applies
accordingly for the resume path. The current behavior doesn't cause
any issue I'd be aware of, but it's not logical and misleading,
especially considering the description of the flag:
"suspended: Set to true if this phy has been suspended successfully"

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c