net: irda: irda-usb: fix firmware name on big-endian hosts
authorJohan Hovold <johan@kernel.org>
Fri, 12 May 2017 10:11:13 +0000 (12:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2017 16:15:46 +0000 (12:15 -0400)
Add missing endianness conversion when using the USB device-descriptor
bcdDevice field to construct a firmware file name.

Fixes: 8ef80aef118e ("[IRDA]: irda-usb.c: STIR421x cleanups")
Cc: stable <stable@vger.kernel.org> # 2.6.18
Cc: Nick Fedchik <nfedchik@atlantic-link.com.ua>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/irda-usb.c

index 8716b8c07febf5669b5fe21d78f1b68b4d10ea3f..6f3c805f72118b1b04b48cc501b8579caeddf37a 100644 (file)
@@ -1077,7 +1077,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
          * are "42101001.sb" or "42101002.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);
         if (ret < 0)
                 return ret;