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

Reply via email to