diff options
Diffstat (limited to 'drivers/usb/host/ehci-omap.c')
-rw-r--r-- | drivers/usb/host/ehci-omap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index f0282d6bb7aa..40a858335035 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/clk.h> | 37 | #include <linux/clk.h> |
38 | #include <linux/gpio.h> | 38 | #include <linux/gpio.h> |
39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
40 | #include <linux/slab.h> | ||
40 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
41 | 42 | ||
42 | /* | 43 | /* |
@@ -628,11 +629,13 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
628 | } | 629 | } |
629 | snprintf(supply, sizeof(supply), "hsusb%d", i); | 630 | snprintf(supply, sizeof(supply), "hsusb%d", i); |
630 | omap->regulator[i] = regulator_get(omap->dev, supply); | 631 | omap->regulator[i] = regulator_get(omap->dev, supply); |
631 | if (IS_ERR(omap->regulator[i])) | 632 | if (IS_ERR(omap->regulator[i])) { |
633 | omap->regulator[i] = NULL; | ||
632 | dev_dbg(&pdev->dev, | 634 | dev_dbg(&pdev->dev, |
633 | "failed to get ehci port%d regulator\n", i); | 635 | "failed to get ehci port%d regulator\n", i); |
634 | else | 636 | } else { |
635 | regulator_enable(omap->regulator[i]); | 637 | regulator_enable(omap->regulator[i]); |
638 | } | ||
636 | } | 639 | } |
637 | 640 | ||
638 | ret = omap_start_ehc(omap, hcd); | 641 | ret = omap_start_ehc(omap, hcd); |