linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event
@ 2012-11-28  3:02 Andrew Duggan
  2012-11-28 15:38 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Duggan @ 2012-11-28  3:02 UTC (permalink / raw)
  To: jkosina; +Cc: Andrew Duggan, linux-input, cheiny

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event
  2012-11-28  3:02 [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event Andrew Duggan
@ 2012-11-28 15:38 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2012-11-28 15:38 UTC (permalink / raw)
  To: Andrew Duggan; +Cc: linux-input, cheiny

On Tue, 27 Nov 2012, Andrew Duggan wrote:

> 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

Right you are!

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-28 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28  3:02 [PATCH] HID: hidraw: fix signaling SIGIO when hidraw reports an event Andrew Duggan
2012-11-28 15:38 ` Jiri Kosina

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).