Re: new version of usbhid autosuspend patch
"Dmitry Torokhov" <[email protected]>
| Newsgroups | gmane.linux.kernel.input,gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Oliver, On 9/27/07, Oliver Neukum <[email protected]> wrote: > +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. -- Dmitry