Re: APC USB ups, Back-UPS ES series, 2.5.68

Greg KH
2003-05-06T04:15:42Z

On Mon, May 05, 2003 at 09:42:37PM -0400, David Ford wrote:
> I haven't had time to look at it and try to debug it. The 96 v.s. 192
> minor look like it's exactly 128 too high. Perhaps it's a simple fix?

Can you try this patch and let me know if it works or not?

thanks,

greg k-h

--- a/drivers/usb/input/hiddev.c Sun May 4 23:49:54 2003
+++ b/drivers/usb/input/hiddev.c Mon May 5 21:23:42 2003
@@ -714,9 +714,9 @@
hiddev->hid = hid;
hiddev->exist = 1;

- sprintf(devfs_name, "usb/hid/hiddev%d", minor);
+ sprintf(devfs_name, "usb/hid/hiddev%d", minor - HIDDEV_MINOR_BASE);
devfs_register(NULL, devfs_name, 0,
- USB_MAJOR, minor + HIDDEV_MINOR_BASE,
+ USB_MAJOR, minor,
S_IFCHR | S_IRUGO | S_IWUSR, &hiddev_fops, NULL);
hid->minor = minor;
hid->hiddev = hiddev;