diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-02-17 14:29:23 +0530 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-05-15 07:29:20 +0200 |
commit | 2c7dac8332eeb3cf13c31fd5ef3873890e94e770 (patch) | |
tree | f64cae29e26f4ba9f0cb674111da01d260b20f7b | |
parent | 1e7874d2f2a281d3214a0307b1b48ffef5c0f955 (diff) | |
download | linux-3.10-2c7dac8332eeb3cf13c31fd5ef3873890e94e770.tar.gz linux-3.10-2c7dac8332eeb3cf13c31fd5ef3873890e94e770.tar.bz2 linux-3.10-2c7dac8332eeb3cf13c31fd5ef3873890e94e770.zip |
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>
[backport from upstream commit 767a1b5d6ec4ac5335dde17100880347ed154ce2]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If65ef9e8d070b4f3d601e139a28246fab36cb40e
-rw-r--r-- | drivers/phy/phy-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index b3555535a8c..6c738376daf 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -176,6 +176,8 @@ int phy_init(struct phy *phy) dev_err(&phy->dev, "phy init failed --> %d\n", ret); goto out; } + } else { + ret = 0; /* Override possible ret == -ENOTSUPP */ } ++phy->init_count; @@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy) dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); goto out; } + } else { + ret = 0; /* Override possible ret == -ENOTSUPP */ } ++phy->power_count; mutex_unlock(&phy->mutex); |