]> git.hungrycats.org Git - linux/commitdiff
USB: hook up the HID device's struct device to the input system properly.
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 20 Jan 2004 07:29:14 +0000 (23:29 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 20 Jan 2004 07:29:14 +0000 (23:29 -0800)
drivers/usb/input/hid-core.c
drivers/usb/input/hid-input.c
drivers/usb/input/hid.h

index bde3364f41fb4f361fc366df09e3199479c1d019..d35807538e82bc4de0c2185c30b403773a73f5a3 100644 (file)
@@ -1546,6 +1546,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
        hid->version = le16_to_cpu(hdesc->bcdHID);
        hid->country = hdesc->bCountryCode;
        hid->dev = dev;
+       hid->intf = intf;
        hid->ifnum = interface->desc.bInterfaceNumber;
 
        hid->name[0] = 0;
index d02886d8275ed11de0f8d847e9353782b2845031..f078f8e6fefdea78ebf5c495a9a04ca05cbbdc5b 100644 (file)
@@ -592,6 +592,7 @@ int hidinput_connect(struct hid_device *hid)
                                hidinput->input.id.vendor = dev->descriptor.idVendor;
                                hidinput->input.id.product = dev->descriptor.idProduct;
                                hidinput->input.id.version = dev->descriptor.bcdDevice;
+                               hidinput->input.dev = &hid->intf->dev;
                        }
 
                        for (i = 0; i < report->maxfield; i++)
index cc13afe00fac2ddc2c1cfed2801f731ae47da57e..535ce3b3e5b45c9dba27211dae6be1fde4b768e9 100644 (file)
@@ -342,6 +342,7 @@ struct hid_device {                                                 /* device report descriptor */
        struct hid_report_enum report_enum[HID_REPORT_TYPES];
 
        struct usb_device *dev;                                         /* USB device */
+       struct usb_interface *intf;                                     /* USB interface */
        int ifnum;                                                      /* USB interface number */
 
        unsigned long iofl;                                             /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */