Thread (12 messages) flat view 12 messages, 4 authors, 2012-04-03

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

From: Michal Malý <hidden>
Date: 2012-04-03 08:03:13
Also in: lkml

On Tuesday 03. of April 2012 4:13:37 you wrote:
On Mon, 2 Apr 2012, Simon Wood wrote:
quoted
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.
Hi,

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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help