On Tue, 2008-07-01 at 15:59 -0700, Andrew Morton wrote: > > + } > > + > > + button = data[1]; > > + > > + /* only report button state changes */ > > + if (button != dev->bt_state) { > > + input_report_key(dev->input, BTN_LEFT, button); > > + input_sync(dev->input); > > + } > > + > > + dev->bt_state = button; > > + > > + exit: > > + retval = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); > > GFP_ATOMIC is a red flag. Is this quite unrelaible allocation mode > really needed here? Being new to kernel work, I rely a lot on how other drivers work. However, doing some reading, these are my observations: * The URB works in interrupt mode. * The call to usb_submit_urb above is within a completion handler. * From what I read on kerneltrap (2.6.22), such URBs should be resubmitted using the ATOMIC method. Maybe this changed, I could not tell. * Personally, I am starting to worry about concurrency races, with the two URBs writing to the same input device. I suppose it depends on whether they are issued on the same interrupt or not? Spin locks? Best regards, Henrik Rydberg -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html