aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-06-10 15:16:16 +0200
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-12-05 23:04:09 +0700
commit66dd54fec5bf3227947e0ce248d10745611dbebc (patch)
treef3869a5ea697b6f54c1ee36f10a8a5c4ae9731f8 /tools
parent774a3437ffa538cd1c82d6944f94476b44f26731 (diff)
downloadkernel_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 'tools')
0 files changed, 0 insertions, 0 deletions