Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68673
b: refs/heads/master
c: bb6c8d8
h: refs/heads/master
i:
  68671: 25292c4
v: v3
  • Loading branch information
Philip Langdale authored and Jiri Kosina committed Oct 14, 2007
1 parent f5342cb commit bc51a27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 446943593e6e2cb7133cb6c969afd4626c96a916
refs/heads/master: bb6c8d8fa9b5587eea18078ce0bcf6bb2905789f
12 changes: 12 additions & 0 deletions trunk/drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/usb.h>
#include <linux/hid.h>
#include <linux/hiddev.h>
#include <linux/compat.h>
#include "usbhid.h"

#ifdef CONFIG_USB_DYNAMIC_MINORS
Expand Down Expand Up @@ -738,6 +739,14 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
return -EINVAL;
}

#ifdef CONFIG_COMPAT
static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct inode *inode = file->f_path.dentry->d_inode;
return hiddev_ioctl(inode, file, cmd, compat_ptr(arg));
}
#endif

static const struct file_operations hiddev_fops = {
.owner = THIS_MODULE,
.read = hiddev_read,
Expand All @@ -747,6 +756,9 @@ static const struct file_operations hiddev_fops = {
.release = hiddev_release,
.ioctl = hiddev_ioctl,
.fasync = hiddev_fasync,
#ifdef CONFIG_COMPAT
.compat_ioctl = hiddev_compat_ioctl,
#endif
};

static struct usb_class_driver hiddev_class = {
Expand Down

0 comments on commit bc51a27

Please sign in to comment.