Re: [PATCH 1/4] usb: phy: twl4030: make runtime pm more reliable.

2015-03-03 Thread NeilBrown
On Mon, 2 Mar 2015 22:03:59 +0100 Pavel Machek wrote: > Hi! > > > + status_changed = > > + (twl->linkstat == OMAP_MUSB_VBUS_VALID || > > +twl->linkstat == OMAP_MUSB_ID_GROUND) > > + != > > + (status == OMAP_MUSB_

Re: [PATCH 1/4] usb: phy: twl4030: make runtime pm more reliable.

2015-03-02 Thread Pavel Machek
Hi! > + status_changed = > + (twl->linkstat == OMAP_MUSB_VBUS_VALID || > + twl->linkstat == OMAP_MUSB_ID_GROUND) > + != > + (status == OMAP_MUSB_VBUS_VALID || > + status == OMAP_MUSB_I

Re: [PATCH 1/4] usb: phy: twl4030: make runtime pm more reliable.

2015-02-24 Thread Tony Lindgren
* NeilBrown [150223 19:45]: > A construct like: > > if (pm_runtime_suspended(twl->dev)) >pm_runtime_get_sync(twl->dev); > > is against the spirit of the runtime_pm interface as it > makes the internal refcounting useless. > > In this case it is also racy, particularly as

[PATCH 1/4] usb: phy: twl4030: make runtime pm more reliable.

2015-02-23 Thread NeilBrown
A construct like: if (pm_runtime_suspended(twl->dev)) pm_runtime_get_sync(twl->dev); is against the spirit of the runtime_pm interface as it makes the internal refcounting useless. In this case it is also racy, particularly as 'put_autosuspend' is use to drop a reference.