On Mon, Oct 10, 2011 at 07:13:14PM +0200, Henrik Rydberg wrote:
quoted
- 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-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html