lkml.org 
[lkml]   [2005]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 16/24] ALPS: fix enabling tapping mode
    From: Peter Osterlund <petero2@telia.com>

    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>
    ---

    drivers/input/mouse/alps.c | 25 +++++++------------------
    1 files changed, 7 insertions(+), 18 deletions(-)

    Index: work/drivers/input/mouse/alps.c
    ===================================================================
    --- work.orig/drivers/input/mouse/alps.c
    +++ work/drivers/input/mouse/alps.c
    @@ -2,7 +2,7 @@
    * ALPS touchpad PS/2 mouse driver
    *
    * Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
    - * Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
    + * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com>
    * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
    * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
    *
    @@ -350,7 +350,6 @@ static int alps_tap_mode(struct psmouse
    static int alps_reconnect(struct psmouse *psmouse)
    {
    struct alps_data *priv = psmouse->private;
    - unsigned char param[4];
    int version;

    psmouse_reset(psmouse);
    @@ -361,14 +360,13 @@ static int alps_reconnect(struct psmouse
    if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
    return -1;

    - if (alps_get_status(psmouse, param))
    + if (alps_tap_mode(psmouse, 1)) {
    + printk(KERN_WARNING "alps.c: Failed to reenable hardware tapping\n");
    return -1;
    -
    - if (!(param[0] & 0x04))
    - alps_tap_mode(psmouse, 1);
    + }

    if (alps_absolute_mode(psmouse)) {
    - printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
    + printk(KERN_ERR "alps.c: Failed to reenable absolute mode\n");
    return -1;
    }

    @@ -389,7 +387,6 @@ static void alps_disconnect(struct psmou
    int alps_init(struct psmouse *psmouse)
    {
    struct alps_data *priv;
    - unsigned char param[4];
    int version;

    psmouse->private = priv = kmalloc(sizeof(struct alps_data), GFP_KERNEL);
    @@ -403,16 +400,8 @@ int alps_init(struct psmouse *psmouse)
    if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
    goto init_fail;

    - if (alps_get_status(psmouse, param)) {
    - printk(KERN_ERR "alps.c: touchpad status report request failed\n");
    - goto init_fail;
    - }
    -
    - if (param[0] & 0x04) {
    - printk(KERN_INFO "alps.c: Enabling hardware tapping\n");
    - if (alps_tap_mode(psmouse, 1))
    - printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
    - }
    + if (alps_tap_mode(psmouse, 1))
    + printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");

    if (alps_absolute_mode(psmouse)) {
    printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-07-25 08:21    [W:0.024 / U:60.404 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site