summaryrefslogtreecommitdiff
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 03:53:19 +0200
committerVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 03:53:19 +0200
commita2ea21bb4b327510007eeeacabb3292aa0ff841d (patch)
tree1eee8049ab6a91f37039909497ce643521f2fa65 /drivers/input/evdev.c
parent040a02c82fc313731f111ac6d228836086aac43f (diff)
parent268c978300c2a850da4a99bbb9a44ce3579da6b6 (diff)
Merge http://linus.bkbits.net:8080/linux-2.5
into twilight.ucw.cz:/home/vojtech/bk/linus
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 0a2f930cf585..af7abcf21c53 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -233,6 +233,7 @@ 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;
@@ -243,11 +244,12 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return put_user(EV_VERSION, (int *) arg);
case EVIOCGID:
- if ((retval = put_user(dev->idbus, ((short *) arg) + 0))) return retval;
- if ((retval = put_user(dev->idvendor, ((short *) arg) + 1))) return retval;
- if ((retval = put_user(dev->idproduct, ((short *) arg) + 2))) return retval;
- if ((retval = put_user(dev->idversion, ((short *) arg) + 3))) return retval;
- return 0;
+ 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));
+
case EVIOCGREP:
if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval;