packages: enable AP mode on r8188eu
[openwrt/openwrt.git] / target / linux / sunxi / patches-3.13 / 160-2-phy-core-dont-porpagate-ENOSUPP.patch
1 From 37e3cce7288f7d5c34ae630f16faf48bd3d01c18 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sun, 5 Jan 2014 22:40:39 +0100
4 Subject: [PATCH] phy-core: Don't propagate -ENOSUPP from
5 phy_pm_runtime_get_sync to caller
6
7 The phy-core allows phy_init and phy_power_on to be called multiple times,
8 but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
9 propagated to the caller for the 2nd and later calls.
10
11 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
12 ---
13 drivers/phy/phy-core.c | 4 ++++
14 1 file changed, 4 insertions(+)
15
16 diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
17 index b355553..6c73837 100644
18 --- a/drivers/phy/phy-core.c
19 +++ b/drivers/phy/phy-core.c
20 @@ -176,6 +176,8 @@ int phy_init(struct phy *phy)
21 dev_err(&phy->dev, "phy init failed --> %d\n", ret);
22 goto out;
23 }
24 + } else {
25 + ret = 0; /* Override possible ret == -ENOTSUPP */
26 }
27 ++phy->init_count;
28
29 @@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy)
30 dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
31 goto out;
32 }
33 + } else {
34 + ret = 0; /* Override possible ret == -ENOTSUPP */
35 }
36 ++phy->power_count;
37 mutex_unlock(&phy->mutex);
38 --
39 1.8.5.5
40