Thread (3 messages) 3 messages, 2 authors, 2007-09-27

Re: new version of usbhid autosuspend patch

flat view

From: Oliver Neukum <oliver@neukum.org>
Date: 2007-09-27 18:09:19

Am Donnerstag 27 September 2007 schrieb Dmitry Torokhov:
Hi Oliver,

On 9/27/07, Oliver Neukum [off-list ref] wrote:
quoted
+int hid_check_keys_pressed(struct hid_device *hid)
+{
+       struct hid_input *hidinput, *next;
+       int i;
+
+       list_for_each_entry_safe(hidinput, next, &hid->inputs, list) {
+               for (i = 0; i < NBITS(KEY_MAX); i++)
+                       if (hidinput->input->key[i])
+                               return 1;
+       }
Why are you using the list_for_each_entry_safe? You do not alter the
list in your loop.
Relict from an older version. I am preparing a new patch.

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