Re: [PATCH] ohci-pxa27x: Reconfigure power settings on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 31, 2009 at 08:44:13PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> Aric D. Blumer wrote:
> 
> > On resume, the power-related bits in UHCRHDA were not being set, so
> > they would default to the reset state.  For PXA3xx devices, OCPM must
> > be cleared, but it was remaining set from resume reset.
> 
> > Signed-off-by: Aric D. Blumer <aric@xxxxxxxxxxxxxx>
> 
> > ---
> 
> > diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
> > index b5294a9..9a2c554 100644
> > --- a/drivers/usb/host/ohci-pxa27x.c
> > +++ b/drivers/usb/host/ohci-pxa27x.c
> > @@ -502,6 +502,9 @@ static int ohci_hcd_pxa27x_drv_resume(struct
> > platform_device *pdev)
> >  	struct usb_hcd *hcd = platform_get_drvdata(pdev);
> >  	struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
> >  	int status;
> > +	struct pxaohci_platform_data *inf;
> > +
> > +	inf = pdev->dev.platform_data;
> > 
> >  	if (time_before(jiffies, ohci->ohci.next_statechange))
> >  		msleep(5);
> > @@ -510,6 +513,13 @@ static int ohci_hcd_pxa27x_drv_resume(struct
> > platform_device *pdev)
> >  	if ((status = pxa27x_start_hc(ohci, &pdev->dev)) < 0)
> >  		return status;
> > 
> > +	if(inf) {
> 
>     There should be space between *if* and bracket. Run your patch thru 
> scripts/checkpatch.pl and it will report this. But the brackets are unneeded 
> anyway.

I made this fix by hand to the patch already.

> 
> > +		/* Select Power Management Mode */
> > +		pxa27x_ohci_select_pmm(ohci, inf->port_mode);
> > +	} else {
> 
>     Here as well...
> 
> > +		pr_err("No platform info on resume");
> > +	}

Well, as there is a comment, the { } are ok to use here.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux