lkml.org 
[lkml]   [2008]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] n-trig digitizer quirks
On Tue, 18 Nov 2008, Rafi Rubin wrote:

> +static int ntrig_input_mapping(struct hid_device *hdev, struct hid_input *hi,
> + struct hid_field *field, struct hid_usage *usage,
> + unsigned long **bit, int *max)
> +{
> + if ( (usage->hid & HID_USAGE_PAGE) == HID_UP_DIGITIZER &&
> + (usage->hid & 0xff) == 0x47) {
> + nt_map_key_clear(BTN_TOOL_DOUBLETAP);
> + return 1;
> + }
> + return 0;
> +}

Could you please keep standard linux-kernel indenting style? I.e.
something like

static int ntrig_input_mapping(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_DIGITIZER &&
(usage->hid & 0xff) == 0x47) {
nt_map_key_clear(BTN_TOOL_DOUBLETAP);
return 1;
}
return 0;
}


> +
> +static int ntrig_input_mapped(struct hid_device *hdev, struct hid_input *hi,
> + struct hid_field *field, struct hid_usage *usage,
> + unsigned long **bit, int *max)
> +{
> + unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);

This could be removed, as it is never used, right?

> +HID_COMPAT_LOAD_DRIVER(ntrig);

Also please don't forget to add HID_COMPAT_CALL_DRIVER() entry into
hid-dummy.c

Besides that it looks OK, so please resend with the above issues fixed,
and I'll queue it in my tree.

Thanks,

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2008-11-19 14:01    [W:0.048 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site