Re: [PATCH 1/3] usb: musb: fix pm_runtime mismatches

From: Alan Stern
Date: Thu Dec 15 2011 - 22:30:56 EST


On Fri, 16 Dec 2011, Felipe Contreras wrote:

> >> --- a/drivers/usb/musb/omap2430.c
> >> +++ b/drivers/usb/musb/omap2430.c
> >> @@ -385,6 +385,7 @@ static void omap2430_musb_disable(struct musb *musb)
> >>
> >> Âstatic int omap2430_musb_exit(struct musb *musb)
> >> Â{
> >> + Â Â pm_runtime_put(musb->controller);
> >> Â Â Â del_timer_sync(&musb_idle_timer);
> >>
> >> Â Â Â omap2430_low_level_exit(musb);
> >
> > Should these calls be pm_runtime_put_sync() instead of
> > pm_runtime_put()?
>
> I don't see why... The thing failed, it's not going to be used any
> more so better let PM deactivate the device.

It's not a big deal. The difference is that pm_runtime_put_sync()
avoids an extra context switch when suspending the device. A minor
optimization, that's all.

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/