2017-03-03 11:42:58

by Yoshihiro Shimoda

[permalink] [raw]
Subject: [PATCH] phy: core: fix the condition to enable pm_runtime in phy_create()

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: [email protected] # v3.13+
Signed-off-by: Yoshihiro Shimoda <[email protected]>
---
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


2017-03-06 05:48:10

by Yoshihiro Shimoda

[permalink] [raw]
Subject: RE: [PATCH] phy: core: fix the condition to enable pm_runtime in phy_create()

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: [email protected] # v3.13+
> Signed-off-by: Yoshihiro Shimoda <[email protected]>

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

Best regards,
Yoshihiro Shimoda