Thread (1 message) 1 message, 1 author, 2011-10-10

Re: [PATCH] usb: Keep track of actual LED state

From: Matthew Garrett <hidden>
Date: 2011-10-10 17:14:40

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help