aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-02-17 03:59:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 15:13:16 -0500
commit767a1b5d6ec4ac5335dde17100880347ed154ce2 (patch)
tree501ec94d375a86819df2c19eedf854c6a35dcd0a /drivers/phy
parentf40037fd3677ae240978f469cc4155bf3ca7c076 (diff)
phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
The phy-core allows phy_init and phy_power_on to be called multiple times, but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be propagated to the caller for the 2nd and later calls. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index b3555535a8c6..6c738376daff 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -176,6 +176,8 @@ int phy_init(struct phy *phy)
176 dev_err(&phy->dev, "phy init failed --> %d\n", ret); 176 dev_err(&phy->dev, "phy init failed --> %d\n", ret);
177 goto out; 177 goto out;
178 } 178 }
179 } else {
180 ret = 0; /* Override possible ret == -ENOTSUPP */
179 } 181 }
180 ++phy->init_count; 182 ++phy->init_count;
181 183
@@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy)
232 dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); 234 dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
233 goto out; 235 goto out;
234 } 236 }
237 } else {
238 ret = 0; /* Override possible ret == -ENOTSUPP */
235 } 239 }
236 ++phy->power_count; 240 ++phy->power_count;
237 mutex_unlock(&phy->mutex); 241 mutex_unlock(&phy->mutex);