Thread (3 messages) 3 messages, 3 authors, 2012-07-20

Re: [PATCH] HID: Allow drivers without listeners to remain on the bus

From: Jiri Kosina <hidden>
Date: 2012-07-20 07:45:46

On Tue, 17 Jul 2012, Henrik Rydberg wrote:
quoted
hid-picolcd and hid-wiimote do not allow any of hidinput, hiddev or hidraw
to claim the device but still want to remain on the bus. Hence, if a
driver uses the raw_event callback but no listener claimed the device, we
still leave it on the bus as the driver probably handles everything by
itself.

Under some circumstances (eg., hidinput_connect() fails and raw_event set)
a device may not be left on the bus even though it has no listeners. But
then if hidinput_connect() fails there are bigger issues than a device
that is left unhandled. So we can safely use this heuristic to avoid
adding another flag for special devices like hid-picolcd and hid-wiimote.

This also removes the ugly hack from hid-picolcd as this is no longer
required.

Signed-off-by: David Herrmann <redacted>
---
Hi Jiri

I posted another patchset that introduced HID_CLAIMED_OTHER to avoid this
heuristic but Henrik convinced me that this trivial check is the cleaner and
less intrusive implementation. If you're interested, the old patchset was here:
  http://thread.gmane.org/gmane.linux.kernel.input/25945

Henrik, can you add your signed-off-by as this was your idea?
Gladly, but I would like to change the wording slightly, since a driver
with raw_event set is a listener, and we are still bailing out if
there are no listeners at all. The title is thus misleading.
So could you guys please come up with a revised version of the patch? I 
like the aproach much more than the previous one, so would like to queue 
it for 3.6 merge window.

Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help