Re: [PATCH 09/10] Input: Hold wake lock while event queue is not empty.

Matthew Garrett
2009-02-13T00:57:04Z

On Thu, Feb 12, 2009 at 04:52:22PM -0800, Arve Hjønnevåg wrote:

> That was not the bug. Another component opened one of the input
> devices, but did not read events from it.

It's not the job of the kernel to guard against userspace doing foolish
things. Either you want to wait for input events to be consumed before
suspend or you don't - arbitrary timeouts provide no guarantees about
the correctness of your platform's behaviour. The default permissions on
the event devices mean that the only components that could interfere
with this are ones under your control, so fixing them seems like the
sensible approach.

--
Matthew Garrett | mjg59@srcf.ucam.org