[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1211061624220.24253@pobox.suse.cz>
Date: Tue, 6 Nov 2012 16:24:38 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Benjamin Tissoires <benjamin.tissoires@...il.com>
Cc: Henrik Rydberg <rydberg@...omail.se>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Stephane Chatty <chatty@...c.fr>,
linux-input <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 03/11] HID: hid-input: add usage_index argument in
input_mapping and event.
On Tue, 6 Nov 2012, Benjamin Tissoires wrote:
> >>> Currently, there is no way to know the index of the current field
> >>> in the .input_mapping and .event callbacks when this field is inside
> >>> an array of HID fields.
> >>> This patch forwards this index to the input_mapping and event
> >>> callbacks.
> >>
> >> I agree with the idea, but the function argument list is becoming
> >> ridiculously long... Could we remove the usage pointer argument, at
> >> least?
> >
> > yeah, totally agree. Let me just check whether it will not introduce
> > more problems than it solves for my driver.
>
> Well, after a deeper look, it's a really bad idea. Every drivers that
> implements input_mapping, input_mapped, event use at least once the
> struct usage. So this would require change nearly every hid driver.
>
> To solve that, and to minimize the impact on the other drivers, I'm
> going to add a field in struct usage with the appropriate index.
Yes please, I like that solution more as well.
Thanks,
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists