summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2013-04-03 12:45:09 +0400
committerFelipe Balbi <balbi@ti.com>2013-04-03 13:02:05 +0400
commitf5ef7b42823945d979ebd957e79bf66dc6a5e3d1 (patch)
tree7c5c67a200f82caa220a9e3d3cced0337b886adf /drivers
parent54dfbb08051c2fa666bd4ce6cb7626b9e2a80655 (diff)
downloadlinux-f5ef7b42823945d979ebd957e79bf66dc6a5e3d1.tar.xz
usb: phy: ab8500-usb: fix unbalanced clock and regulator disable warnings
To prevent clock and regulator frameworks from complaining, only disable the host or peripheral phy if they were enabled. Reported-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/phy/phy-ab8500-usb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 96b4854f25df..fec260ee67d3 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -888,8 +888,10 @@ static int ab8500_usb_remove(struct platform_device *pdev)
usb_remove_phy(&ab->phy);
- ab8500_usb_host_phy_dis(ab);
- ab8500_usb_peri_phy_dis(ab);
+ if (ab->mode == USB_HOST)
+ ab8500_usb_host_phy_dis(ab);
+ else if (ab->mode == USB_PERIPHERAL)
+ ab8500_usb_peri_phy_dis(ab);
platform_set_drvdata(pdev, NULL);