Re: new version of usbhid autosuspend patch

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.kernel.input,gmane.linux.usb.devel
Message-ID <[email protected]>
Am Donnerstag 27 September 2007 schrieb Dmitry Torokhov:
> 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.

Relict from an older version. I am preparing a new patch.

	Thanks
		Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.