diff options
author | Julien BLACHE <jb@jblache.org> | 2007-02-11 18:27:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-03-09 10:50:20 -0800 |
commit | c52d525a40c26d01cc876ed0bc3d9fe16e6090b7 (patch) | |
tree | 5979e2b415d55fdf8c64d8e104d57bec7aef9cf0 /drivers | |
parent | af28fc09453b66e3a2c486fe4e81149537d50cd3 (diff) |
USB HID: Fix USB vendor and product IDs endianness for USB HID devices
The USB vendor and product IDs are not byteswapped appropriately, and
thus come out in the wrong endianness when fetched through the evdev
using ioctl() on big endian platforms.
Signed-off-by: Julien BLACHE <jb@jblache.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/input/hid-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index c6c9e72e5fd9..dd9e546a9702 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1212,8 +1212,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) le16_to_cpu(dev->descriptor.idProduct)); hid->bus = BUS_USB; - hid->vendor = dev->descriptor.idVendor; - hid->product = dev->descriptor.idProduct; + hid->vendor = le16_to_cpu(dev->descriptor.idVendor); + hid->product = le16_to_cpu(dev->descriptor.idProduct); usb_make_path(dev, hid->phys, sizeof(hid->phys)); strlcat(hid->phys, "/input", sizeof(hid->phys)); |