On Mon, Oct 10, 2011 at 07:13:14PM +0200, Henrik Rydberg wrote: > > - usbhid->ledcount--; > > + usbhid->ledstate &= ~(1 << code); > > Could simply check for ledcount > 0 here instead, but it is even uglier. That'd still fail if we had one led turned on and two turned off - depending on the order we'd potentially think that suspend was safe. > Why not test the actual input_dev state here instead? Adding a set/get > led state function to input core could resolve this cleanly. That might well be a better approach. -- Matthew Garrett | mjg59@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html