video: fbdev: add missing USB-descriptor endianness conversions
authorJohan Hovold <johan@kernel.org>
Wed, 14 Jun 2017 10:40:36 +0000 (12:40 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 14 Jun 2017 10:40:36 +0000 (12:40 +0200)
Add the missing endianness conversions when printing the USB
device-descriptor idVendor, idProduct and bcdDevice fields during probe.

Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/smscufx.c
drivers/video/fbdev/udlfb.c

index ec2e7e3536859cae3294d484c5bb56b5330c6db5..449fceaf79d5505a0e2c409adeb968dbaad4413c 100644 (file)
@@ -1646,8 +1646,9 @@ static int ufx_usb_probe(struct usb_interface *interface,
        dev_dbg(dev->gdev, "%s %s - serial #%s\n",
                usbdev->manufacturer, usbdev->product, usbdev->serial);
        dev_dbg(dev->gdev, "vid_%04x&pid_%04x&rev_%04x driver's ufx_data struct at %p\n",
-               usbdev->descriptor.idVendor, usbdev->descriptor.idProduct,
-               usbdev->descriptor.bcdDevice, dev);
+               le16_to_cpu(usbdev->descriptor.idVendor),
+               le16_to_cpu(usbdev->descriptor.idProduct),
+               le16_to_cpu(usbdev->descriptor.bcdDevice), dev);
        dev_dbg(dev->gdev, "console enable=%d\n", console);
        dev_dbg(dev->gdev, "fb_defio enable=%d\n", fb_defio);
 
index 6a3c353de7c35468e68f271126dca1c0b447ae82..a868cbb51a34983cd1579f1e47f41a1d27d17aef 100644 (file)
@@ -1613,8 +1613,9 @@ static int dlfb_usb_probe(struct usb_interface *interface,
        pr_info("%s %s - serial #%s\n",
                usbdev->manufacturer, usbdev->product, usbdev->serial);
        pr_info("vid_%04x&pid_%04x&rev_%04x driver's dlfb_data struct at %p\n",
-               usbdev->descriptor.idVendor, usbdev->descriptor.idProduct,
-               usbdev->descriptor.bcdDevice, dev);
+               le16_to_cpu(usbdev->descriptor.idVendor),
+               le16_to_cpu(usbdev->descriptor.idProduct),
+               le16_to_cpu(usbdev->descriptor.bcdDevice), dev);
        pr_info("console enable=%d\n", console);
        pr_info("fb_defio enable=%d\n", fb_defio);
        pr_info("shadow enable=%d\n", shadow);