Commit d6aa9b42 authored by Johan Hovold's avatar Johan Hovold Committed by Ben Hutchings

net: irda: irda-usb: fix firmware name on big-endian hosts

commit 75cf0679 upstream.

Add missing endianness conversion when using the USB device-descriptor
bcdDevice field to construct a firmware file name.

Fixes: 8ef80aef ("[IRDA]: irda-usb.c: STIR421x cleanups")
Cc: Nick Fedchik <nfedchik@atlantic-link.com.ua>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 44a2efd5
...@@ -1083,7 +1083,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self) ...@@ -1083,7 +1083,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
* are "42101001.sb" or "42101002.sb" * are "42101001.sb" or "42101002.sb"
*/ */
sprintf(stir421x_fw_name, "4210%4X.sb", sprintf(stir421x_fw_name, "4210%4X.sb",
self->usbdev->descriptor.bcdDevice); le16_to_cpu(self->usbdev->descriptor.bcdDevice));
ret = request_firmware(&fw, stir421x_fw_name, &self->usbdev->dev); ret = request_firmware(&fw, stir421x_fw_name, &self->usbdev->dev);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment