summaryrefslogtreecommitdiffstats
path: root/drivers/input/joydev.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-05-20 22:52:58 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-05-20 23:05:28 -0700
commit81c2a3ba497835797332b517ebf2de7b7f2a7c80 (patch)
treea7dee14c14bdf2a1d9a5aa99bf9625943ace70ba /drivers/input/joydev.c
parenta62f0d27b4196bad5e900d766b285feb7069cd16 (diff)
downloadop-kernel-dev-81c2a3ba497835797332b517ebf2de7b7f2a7c80.zip
op-kernel-dev-81c2a3ba497835797332b517ebf2de7b7f2a7c80.tar.gz
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/joydev.c')
-rw-r--r--drivers/input/joydev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 423e0e6..34157bb 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -47,15 +47,15 @@ struct joydev {
struct mutex mutex;
struct device dev;
- struct js_corr corr[ABS_MAX + 1];
+ struct js_corr corr[ABS_CNT];
struct JS_DATA_SAVE_TYPE glue;
int nabs;
int nkey;
__u16 keymap[KEY_MAX - BTN_MISC + 1];
__u16 keypam[KEY_MAX - BTN_MISC + 1];
- __u8 absmap[ABS_MAX + 1];
- __u8 abspam[ABS_MAX + 1];
- __s16 abs[ABS_MAX + 1];
+ __u8 absmap[ABS_CNT];
+ __u8 abspam[ABS_CNT];
+ __s16 abs[ABS_CNT];
};
struct joydev_client {
@@ -826,7 +826,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
joydev->handle.handler = handler;
joydev->handle.private = joydev;
- for (i = 0; i < ABS_MAX + 1; i++)
+ for (i = 0; i < ABS_CNT; i++)
if (test_bit(i, dev->absbit)) {
joydev->absmap[i] = joydev->nabs;
joydev->abspam[joydev->nabs] = i;
OpenPOWER on IntegriCloud