Re: [PATCH] PM / sleep: Don't unset parent's direct_complete

From: Alan Stern
Date: Wed Mar 25 2015 - 14:06:06 EST


On Wed, 25 Mar 2015, Alan Stern wrote:

> On Wed, 25 Mar 2015, Tomeu Vizoso wrote:
>
> > If a device isn't going to be fully-suspended because there isn't an
> > implementation of the suspend callback, there's no need to make sure
> > that its parent is going to be fully-suspended as well.
>
> What do you mean by "fully-suspended"?
>
> What if the parent has several children? Maybe some of them have
> implementations of the suspend callback and the others don't. Will
> your patch do the right thing then?

After thinking about it some more, I realized this won't be a problem.

But what if the device has a child that _does_ have a suspend callback?
In that case the child will need to be resumed, so the device's parent
cannot be allowed to remain in runtime suspend when the system wakes
up. Hence the parent's direct_complete must be cleared.

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/