Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: ALPS - unconditionally enable tapping mode

The condition in alps_init() was also inverted and the driver
was enabling tapping mode only if it was already enabled.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Peter Osterlund and committed by
Dmitry Torokhov
963f626d b30dc120

+7 -18
+7 -18
drivers/input/mouse/alps.c
··· 2 2 * ALPS touchpad PS/2 mouse driver 3 3 * 4 4 * Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au> 5 - * Copyright (c) 2003 Peter Osterlund <petero2@telia.com> 5 + * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com> 6 6 * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru> 7 7 * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz> 8 8 * ··· 350 350 static int alps_reconnect(struct psmouse *psmouse) 351 351 { 352 352 struct alps_data *priv = psmouse->private; 353 - unsigned char param[4]; 354 353 int version; 355 354 356 355 psmouse_reset(psmouse); ··· 360 361 if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) 361 362 return -1; 362 363 363 - if (alps_get_status(psmouse, param)) 364 + if (alps_tap_mode(psmouse, 1)) { 365 + printk(KERN_WARNING "alps.c: Failed to reenable hardware tapping\n"); 364 366 return -1; 365 - 366 - if (!(param[0] & 0x04)) 367 - alps_tap_mode(psmouse, 1); 367 + } 368 368 369 369 if (alps_absolute_mode(psmouse)) { 370 - printk(KERN_ERR "alps.c: Failed to enable absolute mode\n"); 370 + printk(KERN_ERR "alps.c: Failed to reenable absolute mode\n"); 371 371 return -1; 372 372 } 373 373 ··· 387 389 int alps_init(struct psmouse *psmouse) 388 390 { 389 391 struct alps_data *priv; 390 - unsigned char param[4]; 391 392 int version; 392 393 393 394 psmouse->private = priv = kmalloc(sizeof(struct alps_data), GFP_KERNEL); ··· 400 403 if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) 401 404 goto init_fail; 402 405 403 - if (alps_get_status(psmouse, param)) { 404 - printk(KERN_ERR "alps.c: touchpad status report request failed\n"); 405 - goto init_fail; 406 - } 407 - 408 - if (param[0] & 0x04) { 409 - printk(KERN_INFO "alps.c: Enabling hardware tapping\n"); 410 - if (alps_tap_mode(psmouse, 1)) 411 - printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n"); 412 - } 406 + if (alps_tap_mode(psmouse, 1)) 407 + printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n"); 413 408 414 409 if (alps_absolute_mode(psmouse)) { 415 410 printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");