aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJulien BLACHE <jb@jblache.org>2007-02-11 12:20:25 -0500
committerJiri Kosina <jkosina@suse.cz>2007-03-01 03:52:37 -0500
commit9fa2ad5ff4d8ded8c29c7b6cc92a1c3a8d8a2079 (patch)
tree86e4b4c0071a722c13446d59a5bda7ce65bbfc42 /drivers/usb
parent606135a3081e045b677cde164a296c51f66c4633 (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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/input/hid-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index ef09952f2039..905156c52ad3 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1225,8 +1225,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
1225 le16_to_cpu(dev->descriptor.idProduct)); 1225 le16_to_cpu(dev->descriptor.idProduct));
1226 1226
1227 hid->bus = BUS_USB; 1227 hid->bus = BUS_USB;
1228 hid->vendor = dev->descriptor.idVendor; 1228 hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
1229 hid->product = dev->descriptor.idProduct; 1229 hid->product = le16_to_cpu(dev->descriptor.idProduct);
1230 1230
1231 usb_make_path(dev, hid->phys, sizeof(hid->phys)); 1231 usb_make_path(dev, hid->phys, sizeof(hid->phys));
1232 strlcat(hid->phys, "/input", sizeof(hid->phys)); 1232 strlcat(hid->phys, "/input", sizeof(hid->phys));