mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
7611e8d26d
commit
b5531318f1
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue