Commit 8bc73fc9 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Small cleanup in evdev.c, which copies the data directly from

input struct to userspace.
parent 2f39a668
......@@ -233,7 +233,6 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
struct evdev_list *list = file->private_data;
struct evdev *evdev = list->evdev;
struct input_dev *dev = evdev->handle.dev;
struct input_devinfo id;
int retval, t, u;
if (!evdev->exist) return -ENODEV;
......@@ -244,12 +243,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return put_user(EV_VERSION, (int *) arg);
case EVIOCGID:
id.bustype = dev->id.bustype;
id.vendor = dev->id.vendor;
id.product = dev->id.product;
id.version = dev->id.version;
return copy_to_user((void *) arg, &id, sizeof(struct input_devinfo));
return copy_to_user((void *) arg, &dev->id, sizeof(struct input_devinfo));
case EVIOCGREP:
if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment