Re: [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume supportof ehci and ohci

From: Alan Stern
Date: Fri Jul 01 2011 - 15:06:57 EST


On Sat, 2 Jul 2011, Keshava Munegowda wrote:

> From: Keshava Munegowda <Keshava_mgowda@xxxxxx>
>
> The global suspend and resume functions for ehci and ohci
> drivers are implemented; these functions does the
> pm_runtime_get_sync and pm_runtime_put_sync of the
> parent device usbhs core driver respectively.
>
> Signed-off-by: Keshava Munegowda <keshava_mgowda@xxxxxx>
> ---
> drivers/usb/host/ehci-omap.c | 22 ++++++++++++++++++++--
> drivers/usb/host/ohci-omap3.c | 21 +++++++++++++++++++++
> 2 files changed, 41 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> index 178f63e..a02a684 100644
> --- a/drivers/usb/host/ehci-omap.c
> +++ b/drivers/usb/host/ehci-omap.c
> @@ -259,14 +259,32 @@ static void ehci_hcd_omap_shutdown(struct platform_device *pdev)
> hcd->driver->shutdown(hcd);
> }
>
> +static int omap_ehci_resume(struct device *dev)
> +{
> + if (dev->parent)
> + pm_runtime_get_sync(dev->parent);
> + return 0;
> +}
> +
> +static int omap_ehci_suspend(struct device *dev)
> +{
> + if (dev->parent)
> + pm_runtime_put_sync(dev->parent);
> + return 0;
> +}

I don't see any point in these routines (and likewise for
omap_ohci_suspend/resume). When the whole system is going to sleep
anyway, what reason is there for enabling runtime PM on the parent
device?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/