diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-11 23:54:54 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-11 23:55:23 -0800 |
commit | 7105d2ea73e1391b681d0e1212c42f561c64d429 (patch) | |
tree | 5174ea539fe6ac731242c26a5cb95715898b2b2e /drivers/input/mouse/alps.c | |
parent | df2d4637b0813e47ad12af3eacf6b5292c0fb164 (diff) |
Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad
Relative events are only reported via secondary device therefore device
associated with the touchpad should not advertise these capabilities.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index a3f492a50850..b03e7e0b4099 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -487,6 +487,17 @@ int alps_init(struct psmouse *psmouse) if (alps_hw_init(psmouse)) goto init_fail; + /* + * Undo part of setup done for us by psmouse core since touchpad + * is not a relative device. + */ + __clear_bit(EV_REL, dev1->evbit); + __clear_bit(REL_X, dev1->relbit); + __clear_bit(REL_Y, dev1->relbit); + + /* + * Now set up our capabilities. + */ dev1->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY); dev1->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH); dev1->keybit[BIT_WORD(BTN_TOOL_FINGER)] |= BIT_MASK(BTN_TOOL_FINGER); |