diff options
Diffstat (limited to 'drivers/input/misc/uinput.c')
-rw-r--r-- | drivers/input/misc/uinput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 1477466076a..b71eb55f2db 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -300,7 +300,7 @@ static int uinput_validate_absbits(struct input_dev *dev) | |||
300 | unsigned int cnt; | 300 | unsigned int cnt; |
301 | int retval = 0; | 301 | int retval = 0; |
302 | 302 | ||
303 | for (cnt = 0; cnt < ABS_MAX + 1; cnt++) { | 303 | for (cnt = 0; cnt < ABS_CNT; cnt++) { |
304 | if (!test_bit(cnt, dev->absbit)) | 304 | if (!test_bit(cnt, dev->absbit)) |
305 | continue; | 305 | continue; |
306 | 306 | ||
@@ -387,7 +387,7 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu | |||
387 | dev->id.product = user_dev->id.product; | 387 | dev->id.product = user_dev->id.product; |
388 | dev->id.version = user_dev->id.version; | 388 | dev->id.version = user_dev->id.version; |
389 | 389 | ||
390 | size = sizeof(int) * (ABS_MAX + 1); | 390 | size = sizeof(int) * ABS_CNT; |
391 | memcpy(dev->absmax, user_dev->absmax, size); | 391 | memcpy(dev->absmax, user_dev->absmax, size); |
392 | memcpy(dev->absmin, user_dev->absmin, size); | 392 | memcpy(dev->absmin, user_dev->absmin, size); |
393 | memcpy(dev->absfuzz, user_dev->absfuzz, size); | 393 | memcpy(dev->absfuzz, user_dev->absfuzz, size); |