diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-06-10 15:16:16 +0200 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-12-05 23:04:09 +0700 |
commit | 66dd54fec5bf3227947e0ce248d10745611dbebc (patch) | |
tree | f3869a5ea697b6f54c1ee36f10a8a5c4ae9731f8 /drivers/ata | |
parent | 774a3437ffa538cd1c82d6944f94476b44f26731 (diff) | |
download | kernel_samsung_aries-66dd54fec5bf3227947e0ce248d10745611dbebc.zip kernel_samsung_aries-66dd54fec5bf3227947e0ce248d10745611dbebc.tar.gz kernel_samsung_aries-66dd54fec5bf3227947e0ce248d10745611dbebc.tar.bz2 |
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 'drivers/ata')
0 files changed, 0 insertions, 0 deletions