]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8700f56e54d7ba977968598bcb1b6933b60a458e
tree0e1f16a03c59ba56b65299849646417da8721c9c
parent1a4b86a984495a3f9b3b95778eecaedd1c9f84e2
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