HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage
authorAnssi Hannula <anssi.hannula@gmail.com>
Fri, 19 Jan 2007 17:28:17 +0000 (19:28 +0200)
committerJiri Kosina <jkosina@suse.cz>
Sun, 21 Jan 2007 21:18:01 +0000 (22:18 +0100)
commitbe8209753b014f2d7a92b2ec3ff82db478fc86d1
tree2f5a1e5d5b7bbf18c2be569166b86ccd680e9081
parentf7ebf99eb489a02dba2e5a071fde9f5354275a50
HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage

The commit 4916b3a57fc94664677d439b911b8aaf86c7ec23 introduced a
hid regression between 2.6.19 and 2.6.20-rc1. The device put in
input_dev->cdev is now of type usb_device instead of usb_interface.

Before:
> # readlink -f /sys/class/input/input6/event4/device
> /sys/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.1
After:
> # readlink -f /sys/class/input/input3/event3/device
> /sys/devices/pci0000:00/0000:00:10.0/usb1/1-1

This causes breakage:
> # udevinfo -q all -n /dev/input/event3
> P: /class/input/input3/event3
> N: input/event3
> S: input/by-path/pci-1-1--event-
> E: ID_SERIAL=noserial
> E: ID_PATH=pci-1-1-

No ID_MODEL, ID_VENDOR, ID_REVISION, ID_TYPE etc etc.

Fix this by assigning the intf->dev into hid->dev, and fixing
all the users.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/usb/input/hid-core.c
drivers/usb/input/hid-ff.c
drivers/usb/input/hiddev.c
drivers/usb/input/usbhid.h
This page took 0.026771 seconds and 5 git commands to generate.