lkml.org 
[lkml]   [2013]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [appleir] BUG: unable to handle kernel NULL pointer dereference
On Thu, 7 Nov 2013, Benjamin Tissoires wrote:

> Ok, thanks for the report. Could you please test the following patch
> which should solve your problem (hopefully)?

James, do you happen to have testing results please?

>
> Cheers,
> Benjamin
>
> --
>
> >From 54b332b992da1666abe7180b6cecd313c864e0b7 Mon Sep 17 00:00:00 2001
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Thu, 7 Nov 2013 10:46:48 -0500
> Subject: [PATCH] HID: appleir: force input to be set
>
> Some weird remotes are not correctly creating the input device. Their
> report descriptor starts with:
> 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 0
> 0xa1, 0x01, // Collection (Application) 3
>
> whereas others (which are correctly handled) start with:
> 0x05, 0x0c, // Usage Page (Consumer Devices) 0
> 0x09, 0x01, // Usage (Consumer Control) 2
> 0xa1, 0x01, // Collection (Application) 4
>
> The rest of the report descriptor is the same.
>
> Adding the quirk HID_QUIRK_HIDINPUT_FORCE forces hid-input to allocate
> the inputs, and everything should be ok.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/hid-appleir.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c
> index a42e6a3..0e6a42d 100644
> --- a/drivers/hid/hid-appleir.c
> +++ b/drivers/hid/hid-appleir.c
> @@ -297,6 +297,9 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
>
> appleir->hid = hid;
>
> + /* force input as some remotes bypass the input registration */
> + hid->quirks |= HID_QUIRK_HIDINPUT_FORCE;
> +
> spin_lock_init(&appleir->lock);
> setup_timer(&appleir->key_up_timer,
> key_up_tick, (unsigned long) appleir);
>

--
Jiri Kosina
SUSE Labs



\
 
 \ /
  Last update: 2013-11-16 01:41    [W:0.111 / U:2.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site