diff options
Diffstat (limited to 'drivers/usb/input/hid-input.c')
| -rw-r--r-- | drivers/usb/input/hid-input.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 9ac1e9095334..63a4db721f7e 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
| 32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
| 33 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
| 34 | #include <linux/usb_input.h> | ||
| 34 | 35 | ||
| 35 | #undef DEBUG | 36 | #undef DEBUG |
| 36 | 37 | ||
| @@ -397,11 +398,12 @@ ignore: | |||
| 397 | 398 | ||
| 398 | void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs) | 399 | void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs) |
| 399 | { | 400 | { |
| 400 | struct input_dev *input = &field->hidinput->input; | 401 | struct input_dev *input; |
| 401 | int *quirks = &hid->quirks; | 402 | int *quirks = &hid->quirks; |
| 402 | 403 | ||
| 403 | if (!input) | 404 | if (!field->hidinput) |
| 404 | return; | 405 | return; |
| 406 | input = &field->hidinput->input; | ||
| 405 | 407 | ||
| 406 | input_regs(input, regs); | 408 | input_regs(input, regs); |
| 407 | 409 | ||
| @@ -581,10 +583,7 @@ int hidinput_connect(struct hid_device *hid) | |||
| 581 | hidinput->input.name = hid->name; | 583 | hidinput->input.name = hid->name; |
| 582 | hidinput->input.phys = hid->phys; | 584 | hidinput->input.phys = hid->phys; |
| 583 | hidinput->input.uniq = hid->uniq; | 585 | hidinput->input.uniq = hid->uniq; |
| 584 | hidinput->input.id.bustype = BUS_USB; | 586 | usb_to_input_id(dev, &hidinput->input.id); |
| 585 | hidinput->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor); | ||
| 586 | hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct); | ||
| 587 | hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice); | ||
| 588 | hidinput->input.dev = &hid->intf->dev; | 587 | hidinput->input.dev = &hid->intf->dev; |
| 589 | } | 588 | } |
| 590 | 589 | ||
