David Herrmann d937ae5fae HID: uhid: implement read() on uhid devices
User-space can use read() to get a single event from uhid devices. read()
does never return multiple events. This allows us to extend the event
structure and still keep backwards compatibility.

If user-space wants to get multiple events in one syscall, they should use
the readv()/writev() syscalls which are supported by uhid.

This introduces a new lock which helps us synchronizing simultaneous reads
from user-space. We also correctly return -EINVAL/-EFAULT only on errors
and retry the read() when some other thread captured the event faster than
we did.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-06-18 13:42:00 +02:00
..
2012-05-22 16:02:13 -07:00
2012-05-03 17:16:52 -07:00
2012-05-07 09:03:39 -07:00
2012-05-02 00:25:13 +02:00
2012-05-08 12:35:06 +02:00
2012-05-22 16:02:13 -07:00
2012-05-22 16:02:13 -07:00
2012-05-22 16:02:13 -07:00
2012-05-22 09:39:42 -07:00
2012-05-14 13:37:45 -07:00
2012-05-22 15:50:46 -07:00
2012-05-22 16:12:24 -07:00
2012-05-22 15:50:46 -07:00
2012-05-22 09:23:24 -07:00
2012-05-22 09:39:42 -07:00
2012-05-22 13:32:53 -07:00
2012-05-22 16:34:21 -07:00
2012-05-22 16:02:13 -07:00
2012-05-21 16:24:54 -07:00
2012-05-07 09:56:39 +08:00
2012-05-21 16:49:16 -07:00
2012-05-22 09:23:24 -07:00
2012-05-22 16:12:24 -07:00
2012-05-21 17:46:21 -07:00
2012-05-12 09:43:11 +08:00
2012-05-22 16:12:24 -07:00
2012-05-22 16:12:24 -07:00
2012-04-18 13:15:51 -07:00
2012-05-22 15:50:46 -07:00
2012-05-07 12:26:28 -04:00
2012-05-22 16:34:21 -07:00
2012-05-22 16:34:21 -07:00