Skip to content

Commit

Permalink
HID: hidraw: add compatibility ioctl() for 32-bit applications.
Browse files Browse the repository at this point in the history
Added the ioctl function to the compat_ioctl pointer in the file_operations
struct. Before this, some ioctls would fail for 32-bit apps on 64-bit systems.

Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
signal11 authored and Jiri Kosina committed Jan 4, 2011
1 parent 6822968 commit ae5e49c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/hid/hidraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ static const struct file_operations hidraw_ops = {
.open = hidraw_open,
.release = hidraw_release,
.unlocked_ioctl = hidraw_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = hidraw_ioctl,
#endif
.llseek = noop_llseek,
};

Expand Down

0 comments on commit ae5e49c

Please sign in to comment.