lkml.org 
[lkml]   [2014]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.16.y-ckt 136/254] HID: input: Fix TransducerSerialNumber implementation
    Date
    3.16.7-ckt2 -stable review patch.  If anyone has any objections, please let me know.

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

    From: Jason Gerecke <killertofu@gmail.com>

    commit 5989a55a4c9aafba8b152c6bf52244510c2b88b9 upstream.

    The commit which introduced TransducerSerialNumber (368c966) is missing
    two crucial implementation details. Firstly, the commit does not set the
    type/code/bit/max fields as expected later down the code which can cause
    the driver to crash when a tablet with this usage is connected. Secondly,
    the call to 'set_bit' causes MSC_PULSELED to be sent instead of the
    expected MSC_SERIAL. This commit addreses both issues.

    Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Reviewed-by: Ping Cheng <pingc@wacom.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    drivers/hid/hid-input.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
    index 2619f7f4517a..cb1b3faedb97 100644
    --- a/drivers/hid/hid-input.c
    +++ b/drivers/hid/hid-input.c
    @@ -689,7 +689,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
    break;

    case 0x5b: /* TransducerSerialNumber */
    - set_bit(MSC_SERIAL, input->mscbit);
    + usage->type = EV_MSC;
    + usage->code = MSC_SERIAL;
    + bit = input->mscbit;
    + max = MSC_MAX;
    break;

    default: goto unknown;
    --
    2.1.0


    \
     
     \ /
      Last update: 2014-11-25 13:01    [W:7.858 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site