Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262906
b: refs/heads/master
c: d4aefec
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and Felipe Balbi committed Aug 1, 2011
1 parent 9eebc3b commit f8fdcd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c240d78a8f9b1d4e1d391203f4a698117fae3474
refs/heads/master: d4aefec5daf51ebda90ebf0989598c206cf8e640
16 changes: 16 additions & 0 deletions trunk/drivers/usb/host/ehci-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -231,9 +243,11 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
omap_usbhs_disable(dev);

err_enable:
disable_put_regulator(pdata);
usb_put_hcd(hcd);

err_io:
iounmap(regs);
return ret;
}

Expand All @@ -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;
}
Expand Down

0 comments on commit f8fdcd7

Please sign in to comment.