From: Andrew Duggan <aduggan@synaptics.com>
To: jkosina@suse.cz
Cc: Andrew Duggan <aduggan@synaptics.com>,
linux-input@vger.kernel.org, cheiny@synaptics.com
Subject: [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event
Date: Tue, 27 Nov 2012 19:02:27 -0800 [thread overview]
Message-ID: <1354071747-14007-1-git-send-email-aduggan@synaptics.com> (raw)
Hi Jiri and Linux-Input,
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>
---
drivers/hid/hidraw.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 7c47fc3..d4a5af4 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
--
1.7.10.4
next reply other threads:[~2012-11-28 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 3:02 Andrew Duggan [this message]
2012-11-28 15:38 ` [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354071747-14007-1-git-send-email-aduggan@synaptics.com \
--to=aduggan@synaptics.com \
--cc=cheiny@synaptics.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).