summaryrefslogtreecommitdiff
path: root/drivers/hid/hidraw.c
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2012-11-28 07:02:27 +0400
committerJiri Kosina <jkosina@suse.cz>2012-11-28 19:36:18 +0400
commitb5531318f18b5054c0e4a82beb560a77d85948d8 (patch)
tree6c84c9721fc8a52416a644dba5e81e8faad4cbf7 /drivers/hid/hidraw.c
parent7611e8d26d8dd0e5e132b46e905cb579daf9da1e (diff)
downloadlinux-b5531318f18b5054c0e4a82beb560a77d85948d8.tar.xz
HID: hidraw: fix signaling SIGIO when hidraw reports an event
This patch fixes sending SIGIO from hidraw_report_event by creating a fasync handler which adds the fasync entry. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r--drivers/hid/hidraw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 1d8c0219117e..413a73187d33 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -295,6 +295,13 @@ out:
}
+static int hidraw_fasync(int fd, struct file *file, int on)
+{
+ struct hidraw_list *list = file->private_data;
+
+ return fasync_helper(fd, file, on, &list->fasync);
+}
+
static int hidraw_release(struct inode * inode, struct file * file)
{
unsigned int minor = iminor(inode);
@@ -438,6 +445,7 @@ static const struct file_operations hidraw_ops = {
.open = hidraw_open,
.release = hidraw_release,
.unlocked_ioctl = hidraw_ioctl,
+ .fasync = hidraw_fasync,
#ifdef CONFIG_COMPAT
.compat_ioctl = hidraw_ioctl,
#endif