This patch fixes an issue that phy_create() never enables the pm_runtime.
And then, we can remove calling the pm_runtime_{en,dis}able from some
phy drivers.

Fixes: ff764963479a ("drivers: phy: add generic PHY framework")
Cc: sta...@vger.kernel.org # v3.13+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
---
 drivers/phy/phy-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index a268f4d..17e350f 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -759,7 +759,7 @@ struct phy *phy_create(struct device *dev, struct 
device_node *node,
        if (ret)
                goto put_dev;
 
-       if (pm_runtime_enabled(dev)) {
+       if (!pm_runtime_enabled(dev)) {
                pm_runtime_enable(&phy->dev);
                pm_runtime_no_callbacks(&phy->dev);
        }
-- 
1.9.1

Reply via email to