diff mbox

phy: core: fix the condition to enable pm_runtime in phy_create()

Message ID 1488540814-21232-1-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
State Rejected
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Yoshihiro Shimoda March 3, 2017, 11:32 a.m. UTC
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: stable@vger.kernel.org # v3.13+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/phy/phy-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yoshihiro Shimoda March 6, 2017, 5:46 a.m. UTC | #1
Hi,

> From: Yoshihiro Shimoda
> Sent: Friday, March 03, 2017 8:33 PM
> 
> 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: stable@vger.kernel.org # v3.13+
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

I would like to recall this patch because I completely misunderstand this condition.
I apologize for that.

Best regards,
Yoshihiro Shimoda
diff mbox

Patch

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);
 	}