Thread (4 messages) 4 messages, 3 authors, 2008-11-04

Re: cleanup of hiddev

From: Oliver Neukum <oliver@neukum.org>
Date: 2008-11-04 22:59:30

Am Dienstag, 4. November 2008 23:57:02 schrieb Jiri Slaby:
On 11/04/2008 11:51 PM, Oliver Neukum wrote:
quoted
If you call usb_register_dev() before you set
hiddev_table[usbhid->intf->minor - HIDDEV_MINOR_BASE]
this check in hiddev_open() may fail:
      if (i >= HIDDEV_MINORS || i < 0 || !hiddev_table[i])
              return -ENODEV;
I think, that's the point. You should also get ENODEV if you don't call
usb_register_dev(), create a node for non-existent minor manually and try to
open it. It behaves the same as if there was a lock you suggested...
But by calling usb_register_dev() we also cause the kernel to emit a
hotplug event that tells udev that the device exists.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.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