Re: [PATCH V2][RESEND] USB: ohci-s3c2410: add PM support

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

 



> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxx]
> Sent: Tuesday, November 29, 2011 8:48 PM
> To: jg1.han@xxxxxxxxxxx
> Cc: Greg Kroah-Hartman; Alan Stern; linux-usb@xxxxxxxxxxxxxxx; Ben Dooks
> Subject: Re: [PATCH V2][RESEND] USB: ohci-s3c2410: add PM support
> 
> Hello.
> 
> On 29-11-2011 4:45, Jingoo Han wrote:
> 
> >>> This patch adds power management support such as suspend and resume
> >>> functions.
> 
> >>> Signed-off-by: Jingoo Han<jg1.han@xxxxxxxxxxx>
> >>> ---
> >>>    drivers/usb/host/ohci-s3c2410.c |   55
> +++++++++++++++++++++++++++++++++++++-
> >>>    1 files changed, 53 insertions(+), 2 deletions(-)
> 
> >>> diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-
> >> s3c2410.c
> >>> index a1877c4..56dcf06 100644
> >>> --- a/drivers/usb/host/ohci-s3c2410.c
> >>> +++ b/drivers/usb/host/ohci-s3c2410.c
> >>> @@ -486,15 +486,66 @@ static int __devexit
> >> ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
> >>>    	return 0;
> >>>    }
> >>>
> >>> +#ifdef CONFIG_PM
> >> [...]
> >>> +#else
> >>> +#define ohci_hcd_s3c2410_drv_suspend	NULL
> >>> +#define ohci_hcd_s3c2410_drv_resume	NULL
> >>> +#endif
> >>> +
> >>> +static const struct dev_pm_ops ohci_hcd_s3c2410_pm_ops = {
> >>> +	.suspend	= ohci_hcd_s3c2410_drv_suspend,
> >>> +	.resume		= ohci_hcd_s3c2410_drv_resume,
> >>> +};
> >>> +
> >>>    static struct platform_driver ohci_hcd_s3c2410_driver = {
> >>>    	.probe		= ohci_hcd_s3c2410_drv_probe,
> >>>    	.remove		= __devexit_p(ohci_hcd_s3c2410_drv_remove),
> >>>    	.shutdown	= usb_hcd_platform_shutdown,
> >>> -	/*.suspend	= ohci_hcd_s3c2410_drv_suspend, */
> >>> -	/*.resume	= ohci_hcd_s3c2410_drv_resume, */
> >>>    	.driver		= {
> >>>    		.owner	= THIS_MODULE,
> >>>    		.name	= "s3c2410-ohci",
> >>> +		.pm	=&ohci_hcd_s3c2410_pm_ops,
> 
> >>      Shouldn't contrarywise 'ohci_hcd_s3c2410_pm_ops' be defined as
NULL
> >> when CONFIG_PM=n?
> 
> > I don't think so. ehci-s5p.c works properly in this way.
> > Is there any problem?
> 
>    Probably not, but that's how this is usually done.
Greg, how about your opinion?
Could you accept this patch or do I have to make patch v3?
Thanks.
> 
> WBR, Sergei

--
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