aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 16:41:16 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 16:41:31 -0700
commitacab460b0f618e1e9663eea8c52ad5edd552ed1d (patch)
treec139f945e7a05ab3a12ced855453f8f48762d84e /drivers/usb/host
parentMerge branch 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus (diff)
parentusb: musb: fix oops on musb_gadget_pullup (diff)
downloadlinux-dev-acab460b0f618e1e9663eea8c52ad5edd552ed1d.tar.xz
linux-dev-acab460b0f618e1e9663eea8c52ad5edd552ed1d.zip
Merge branch 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus
* 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: usb: musb: fix oops on musb_gadget_pullup usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1) usb: gadget: hid: don't STALL when processing a HID Descriptor request usb: musb: fix Kconfig usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclared usb: gadget: composite: fix bMaxPacketSize for SuperSpeed usb: gadget: fusb300: remove #if 0 block usb: gadget: s3c2410_udc: fix unterminated platform_device_id table
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-omap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 55a57c23dd0f..45240321ca09 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -98,6 +98,18 @@ static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
}
}
+static void disable_put_regulator(
+ struct ehci_hcd_omap_platform_data *pdata)
+{
+ int i;
+
+ for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
+ if (pdata->regulator[i]) {
+ regulator_disable(pdata->regulator[i]);
+ regulator_put(pdata->regulator[i]);
+ }
+ }
+}
/* configure so an HC device and id are always provided */
/* always called with process context; sleeping is OK */
@@ -231,9 +243,11 @@ err_add_hcd:
omap_usbhs_disable(dev);
err_enable:
+ disable_put_regulator(pdata);
usb_put_hcd(hcd);
err_io:
+ iounmap(regs);
return ret;
}
@@ -253,6 +267,8 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
usb_remove_hcd(hcd);
omap_usbhs_disable(dev);
+ disable_put_regulator(dev->platform_data);
+ iounmap(hcd->regs);
usb_put_hcd(hcd);
return 0;
}