lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.13 136/160] HID: wacom: bits shifted too much for 9th and 10th buttons
    Date
    4.13-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Ping Cheng <pinglinux@gmail.com>

    commit ce06760ba46b66dae50f2519ae76bd15e89b5710 upstream.

    Cintiq 12 has 10 expresskey buttons. The bit shift for the last
    two buttons were off by 5.

    Fixes: c7f0522 ("HID: wacom: Slim down wacom_intuos_pad processing")

    Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
    Tested-by: Matthieu Robin <matthieu@macolu.org>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Cc: Jason Gerecke <killertofu@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/hid/wacom_wac.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/drivers/hid/wacom_wac.c
    +++ b/drivers/hid/wacom_wac.c
    @@ -567,8 +567,8 @@ static int wacom_intuos_pad(struct wacom
    keys = data[9] & 0x07;
    }
    } else {
    - buttons = ((data[6] & 0x10) << 10) |
    - ((data[5] & 0x10) << 9) |
    + buttons = ((data[6] & 0x10) << 5) |
    + ((data[5] & 0x10) << 4) |
    ((data[6] & 0x0F) << 4) |
    (data[5] & 0x0F);
    }

    \
     
     \ /
      Last update: 2017-10-10 22:15    [W:3.774 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site