Commit:     9fa2ad5ff4d8ded8c29c7b6cc92a1c3a8d8a2079
Parent:     606135a3081e045b677cde164a296c51f66c4633
Author:     Julien BLACHE <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 11 18:20:25 2007 +0100
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Mar 1 09:52:37 2007 +0100

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
 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 ef09952..905156c 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)
        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));
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to