aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hiddev.c
diff options
context:
space:
mode:
authorArnaud Quette <arnaud.quette@mgeups.com>2002-10-22 21:27:03 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-10-22 21:27:03 -0700
commit1200021c7d90ea08b546fb78e393c5ae3be9dd2e (patch)
tree6d8f61c4b55d8105f3e8f1997545cf6a8a18c952 /drivers/usb/input/hiddev.c
parent[PATCH] USB: hpusbscsi - kill wrong error case (diff)
downloadhistory-1200021c7d90ea08b546fb78e393c5ae3be9dd2e.tar.gz
history-1200021c7d90ea08b546fb78e393c5ae3be9dd2e.zip
[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.
Diffstat (limited to '')
-rw-r--r--drivers/usb/input/hiddev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
index 8d52544ed3..68ac9b6774 100644
--- a/drivers/usb/input/hiddev.c
+++ b/drivers/usb/input/hiddev.c
@@ -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;