On Wed, 16 Oct 2013, Nikita Kiryanov wrote:

> Add regulator support for usb so that it would be possible to turn
> it on and off (also for suspend/resume).
> 
> Cc: Alan Stern <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Signed-off-by: Nikita Kiryanov <[email protected]>
> Signed-off-by: Igor Grinberg <[email protected]>


> @@ -413,10 +420,16 @@ int usb_hcd_pxa27x_probe (const struct hc_driver 
> *driver, struct platform_device
>       ohci->dev = &pdev->dev;
>       ohci->clk = usb_clk;
>       ohci->mmio_base = (void __iomem *)hcd->regs;
> +     ohci->usb_regulator = regulator_get(&pdev->dev, "vcc usb");
> +     if (IS_ERR(ohci->usb_regulator)) {
> +             pr_err("could not obtain usb regulator");

dev_err(), please.

> +             retval = PTR_ERR(ohci->usb_regulator);
> +             goto err3;
> +     }
>  
>       if ((retval = pxa27x_start_hc(ohci, &pdev->dev)) < 0) {
>               pr_debug("pxa27x_start_hc failed");
> -             goto err3;
> +             goto err4;
>       }
>  
>       /* Select Power Management Mode */

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to