diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-06-10 13:16:16 (GMT) |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-06-18 11:42:00 (GMT) |
commit | d937ae5fae17e63aaa97f029be221a6516b25475 (patch) | |
tree | 2ef5c99a73fe3d9c9ef2e85bdf72d0807b170d5b /arch/c6x | |
parent | 1f9dec1e0164b48da9b268a02197f38caa69b118 (diff) | |
download | linux-fsl-qoriq-d937ae5fae17e63aaa97f029be221a6516b25475.tar.xz |
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>
Diffstat (limited to 'arch/c6x')
0 files changed, 0 insertions, 0 deletions