Custom Search

Re: [PATCH 1/2] HID: hid-lg4ff: Use Private Data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Tuesday 03. of April 2012 4:13:37 you wrote:
> On Mon, 2 Apr 2012, Simon Wood wrote:
> > Use private data in hid-lg4ff to store device properties.
> I'd like to have a more verbose changelog -- namely what advantage this
> brings compared to the previous state.
> Thanks.

the previous implementation used a linked list to store the device
configuration (at this point it was just the operating range, but I have plans
for further expansion, I guess Simon's LEDs patch could use that too).
Searching through the list every time the user adjusted the range wasn't
exactly fast, particularly because the list used kobj name as the ID. I
originally opted for that solution because I didn't want to mess with the code
of the whole hid-lg driver.
This patch takes advantage of the changes introduced in my patches from
2011/04/02. lg4ff now calls hid_get/set_drvdata() to read or store device
configuration. The way I understand it, this is how all HID drivers store their
private data.

Since J. Slabý complained about unnecessary uninitialized_var() macros, I'll
update the patch to remove them.

Michal M.

Attachment: signature.asc
Description: This is a digitally signed message part.

[Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux