diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-05-21 05:52:58 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-05-21 06:05:28 (GMT) |
commit | 81c2a3ba497835797332b517ebf2de7b7f2a7c80 (patch) | |
tree | a7dee14c14bdf2a1d9a5aa99bf9625943ace70ba /drivers/input/misc | |
parent | a62f0d27b4196bad5e900d766b285feb7069cd16 (diff) | |
download | linux-fsl-qoriq-81c2a3ba497835797332b517ebf2de7b7f2a7c80.tar.xz |
Input: use ABS_CNT rather than (ABS_MAX + 1)
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-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 1477466..b71eb55 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) unsigned int cnt; int retval = 0; - for (cnt = 0; cnt < ABS_MAX + 1; cnt++) { + for (cnt = 0; cnt < ABS_CNT; cnt++) { if (!test_bit(cnt, dev->absbit)) continue; @@ -387,7 +387,7 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu dev->id.product = user_dev->id.product; dev->id.version = user_dev->id.version; - size = sizeof(int) * (ABS_MAX + 1); + size = sizeof(int) * ABS_CNT; memcpy(dev->absmax, user_dev->absmax, size); memcpy(dev->absmin, user_dev->absmin, size); memcpy(dev->absfuzz, user_dev->absfuzz, size); |