diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-22 14:33:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-22 14:33:55 -0400 |
| commit | cedd5f659eb9b51a6869806aa123fb10f8f83d86 (patch) | |
| tree | 9f362597fb4c2b9d19546df5c64f47b8eaf19854 /drivers/phy/phy-core.c | |
| parent | f897522468fac92b8673151113d6d251b51e6b33 (diff) | |
| parent | a886bd92267c9e3d5c912860c6fb5a68479a7643 (diff) | |
Merge tag 'usb-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB / PHY driver fixes from Greg KH:
"Here's a number of USB and PHY driver fixes for 4.0-rc5.
The largest thing here is a revert of a gadget function driver patch
that removes 500 lines of code. Other than that, it's a number of
reported bugs fixes and new quirk/id entries.
All have been in linux-next for a while"
* tag 'usb-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
usb: common: otg-fsm: only signal connect after switching to peripheral
uas: Add US_FL_NO_ATA_1X for Initio Corporation controllers / devices
USB: ehci-atmel: rework clk handling
MAINTAINERS: add entry for USB OTG FSM
usb: chipidea: otg: add a_alt_hnp_support response for B device
phy: omap-usb2: Fix missing clk_prepare call when using old dt name
phy: ti/omap: Fix modalias
phy: core: Fixup return value of phy_exit when !pm_runtime_enabled
phy: miphy28lp: Convert to devm_kcalloc and fix wrong sizof
phy: miphy365x: Convert to devm_kcalloc and fix wrong sizeof
phy: twl4030-usb: Remove redundant assignment for twl->linkstat
phy: exynos5-usbdrd: Fix off-by-one valid value checking for args->args[0]
phy: Find the right match in devm_phy_destroy()
phy: rockchip-usb: Fixup rockchip_usb_phy_power_on failure path
phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation
phy: samsung-usb2: Remove NULL terminating entry from phys array
phy: hix5hd2-sata: Check return value of platform_get_resource
phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function
Revert "usb: gadget: zero: Add support for interrupt EP"
Revert "xhci: Clear the host side toggle manually when endpoint is 'soft reset'"
...
Diffstat (limited to 'drivers/phy/phy-core.c')
| -rw-r--r-- | drivers/phy/phy-core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index a12d35338313..3791838f4bd4 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c | |||
| @@ -52,7 +52,9 @@ static void devm_phy_consume(struct device *dev, void *res) | |||
| 52 | 52 | ||
| 53 | static int devm_phy_match(struct device *dev, void *res, void *match_data) | 53 | static int devm_phy_match(struct device *dev, void *res, void *match_data) |
| 54 | { | 54 | { |
| 55 | return res == match_data; | 55 | struct phy **phy = res; |
| 56 | |||
| 57 | return *phy == match_data; | ||
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | /** | 60 | /** |
| @@ -223,6 +225,7 @@ int phy_init(struct phy *phy) | |||
| 223 | ret = phy_pm_runtime_get_sync(phy); | 225 | ret = phy_pm_runtime_get_sync(phy); |
| 224 | if (ret < 0 && ret != -ENOTSUPP) | 226 | if (ret < 0 && ret != -ENOTSUPP) |
| 225 | return ret; | 227 | return ret; |
| 228 | ret = 0; /* Override possible ret == -ENOTSUPP */ | ||
| 226 | 229 | ||
| 227 | mutex_lock(&phy->mutex); | 230 | mutex_lock(&phy->mutex); |
| 228 | if (phy->init_count == 0 && phy->ops->init) { | 231 | if (phy->init_count == 0 && phy->ops->init) { |
| @@ -231,8 +234,6 @@ int phy_init(struct phy *phy) | |||
| 231 | dev_err(&phy->dev, "phy init failed --> %d\n", ret); | 234 | dev_err(&phy->dev, "phy init failed --> %d\n", ret); |
| 232 | goto out; | 235 | goto out; |
| 233 | } | 236 | } |
| 234 | } else { | ||
| 235 | ret = 0; /* Override possible ret == -ENOTSUPP */ | ||
| 236 | } | 237 | } |
| 237 | ++phy->init_count; | 238 | ++phy->init_count; |
| 238 | 239 | ||
| @@ -253,6 +254,7 @@ int phy_exit(struct phy *phy) | |||
| 253 | ret = phy_pm_runtime_get_sync(phy); | 254 | ret = phy_pm_runtime_get_sync(phy); |
| 254 | if (ret < 0 && ret != -ENOTSUPP) | 255 | if (ret < 0 && ret != -ENOTSUPP) |
| 255 | return ret; | 256 | return ret; |
| 257 | ret = 0; /* Override possible ret == -ENOTSUPP */ | ||
| 256 | 258 | ||
| 257 | mutex_lock(&phy->mutex); | 259 | mutex_lock(&phy->mutex); |
| 258 | if (phy->init_count == 1 && phy->ops->exit) { | 260 | if (phy->init_count == 1 && phy->ops->exit) { |
| @@ -287,6 +289,7 @@ int phy_power_on(struct phy *phy) | |||
| 287 | ret = phy_pm_runtime_get_sync(phy); | 289 | ret = phy_pm_runtime_get_sync(phy); |
| 288 | if (ret < 0 && ret != -ENOTSUPP) | 290 | if (ret < 0 && ret != -ENOTSUPP) |
| 289 | return ret; | 291 | return ret; |
| 292 | ret = 0; /* Override possible ret == -ENOTSUPP */ | ||
| 290 | 293 | ||
| 291 | mutex_lock(&phy->mutex); | 294 | mutex_lock(&phy->mutex); |
| 292 | if (phy->power_count == 0 && phy->ops->power_on) { | 295 | if (phy->power_count == 0 && phy->ops->power_on) { |
| @@ -295,8 +298,6 @@ int phy_power_on(struct phy *phy) | |||
| 295 | dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); | 298 | dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); |
| 296 | goto out; | 299 | goto out; |
| 297 | } | 300 | } |
| 298 | } else { | ||
| 299 | ret = 0; /* Override possible ret == -ENOTSUPP */ | ||
| 300 | } | 301 | } |
| 301 | ++phy->power_count; | 302 | ++phy->power_count; |
| 302 | mutex_unlock(&phy->mutex); | 303 | mutex_unlock(&phy->mutex); |
