diff mbox

mmc: vub3000: add missing USB-descriptor endianness conversions

Message ID 20170512100335.1637-1-johan@kernel.org
State New
Headers show

Commit Message

Johan Hovold May 12, 2017, 10:03 a.m. UTC
Add the missing endianness conversions when printing the USB
device-descriptor idVendor and idProduct fields during probe.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/mmc/host/vub300.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ulf Hansson May 15, 2017, 10:51 a.m. UTC | #1
On 12 May 2017 at 12:03, Johan Hovold <johan@kernel.org> wrote:
> Add the missing endianness conversions when printing the USB
> device-descriptor idVendor and idProduct fields during probe.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Thanks, applied for next!

Kind regards
Uffe


> ---
>  drivers/mmc/host/vub300.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
> index c061e7c704be..fbeea1a491a6 100644
> --- a/drivers/mmc/host/vub300.c
> +++ b/drivers/mmc/host/vub300.c
> @@ -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) {
> --
> 2.13.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index c061e7c704be..fbeea1a491a6 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -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) {