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, ...@@ -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_list *list = file->private_data;
struct evdev *evdev = list->evdev; struct evdev *evdev = list->evdev;
struct input_dev *dev = evdev->handle.dev; struct input_dev *dev = evdev->handle.dev;
struct input_devinfo id;
int retval, t, u; int retval, t, u;
if (!evdev->exist) return -ENODEV; if (!evdev->exist) return -ENODEV;
...@@ -244,12 +243,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -244,12 +243,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return put_user(EV_VERSION, (int *) arg); return put_user(EV_VERSION, (int *) arg);
case EVIOCGID: case EVIOCGID:
id.bustype = dev->id.bustype; return copy_to_user((void *) arg, &dev->id, sizeof(struct input_devinfo));
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));
case EVIOCGREP: case EVIOCGREP:
if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval; 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