Commit 1200021c authored by Arnaud Quette's avatar Arnaud Quette Committed by Greg Kroah-Hartman

[PATCH] drivers/usb/input/hiddev.c: fix hiddev_connect issue when

The following one line patch (against 2.5.44) fixes an index problem when
connecting a new hiddev
device, when kernel isn't compiled with CONFIG_USB_DYNAMIC_MINORS. Previous
attempt to open
hiddev device terminated with an ENODEV error. Note that this fix works with
either dynamic minors
flag enabled or not.
parent b57d04eb
......@@ -701,7 +701,7 @@ int hiddev_connect(struct hid_device *hid)
init_waitqueue_head(&hiddev->wait);
hiddev->minor = minor;
hiddev_table[minor] = hiddev;
hiddev_table[minor - HIDDEV_MINOR_BASE] = hiddev;
hiddev->hid = hid;
hiddev->exist = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment