Commit 609088f5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: hook up the HID device's struct device to the input system properly.

parent 93cab357
......@@ -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;
......
......@@ -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++)
......
......@@ -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) */
......
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