From 315eb996d5505112b22452ccbc7e01fb02eaae81 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 16 Nov 2009 22:12:21 -0800 Subject: Input: psmouse - rework setting of BTN_MIDDLE capability Do not start protocol detection assuming that middle mouse is present, instead let individual protocols explicitly set this capability. This fixes issue with Synaptics touchpads pretending that they have middle button when hardware clearly reports otherwise. Reported-and-tested-by: Andrey Borzenkov Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/logips2pp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/mouse/logips2pp.c') diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index ab5dc5f5fd8..543c240a85f 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c @@ -404,8 +404,8 @@ int ps2pp_init(struct psmouse *psmouse, bool set_properties) } } - if (buttons < 3) - __clear_bit(BTN_MIDDLE, psmouse->dev->keybit); + if (buttons >= 3) + __set_bit(BTN_MIDDLE, psmouse->dev->keybit); if (model_info) ps2pp_set_model_properties(psmouse, model_info, use_ps2pp); -- cgit