Skip to contentSkip to conversation

mmc: vub3000: add missing USB-descriptor endianness conversions

PATCH Applied Johan Hovold 2 participants 2 messages May 12, 2017 – May 15, 2017 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: vub3000: add missing USB-descriptor endianness conversions

Add the missing endianness conversions when printing the USB device-descriptor idVendor and idProduct fields during probe.

---
 drivers/mmc/host/vub300.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/vub300.c +2 -1
index c061e7c704be..fbeea1a491a6 100644
@@ -2107,7 +2107,8 @@ static int vub300_probe(struct usb_interface *interface,
 	usb_string(udev, udev->descriptor.iSerialNumber, serial_number,
 		   sizeof(serial_number));
 	dev_info(&udev->dev, "probing VID:PID(%04X:%04X) %s %s %s\n",
-		 udev->descriptor.idVendor, udev->descriptor.idProduct,
+		 le16_to_cpu(udev->descriptor.idVendor),
+		 le16_to_cpu(udev->descriptor.idProduct),
 		 manufacturer, product, serial_number);
 	command_out_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!command_out_urb) {
Signature · 6 lines
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170512100335.1637-1-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Applied
#2 lore raw
Quoted 4 lines · Johan Hovold

Add the missing endianness conversions when printing the USB device-descriptor idVendor and idProduct fields during probe.

Thanks, applied for next!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/vub300.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/vub300.c +2 -2
index c061e7c704be..fbeea1a491a6 100644
@@ -2107,7 +2107,8 @@ static int vub300_probe(struct usb_interface *interface,
        usb_string(udev, udev->descriptor.iSerialNumber, serial_number,
                   sizeof(serial_number));
        dev_info(&udev->dev, "probing VID:PID(%04X:%04X) %s %s %s\n",
-                udev->descriptor.idVendor, udev->descriptor.idProduct,
+                le16_to_cpu(udev->descriptor.idVendor),
+                le16_to_cpu(udev->descriptor.idProduct),
                 manufacturer, product, serial_number);
        command_out_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!command_out_urb) {
--
Quoted 2 lines

2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html