Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>

authored by

Johan Hovold and committed by
David S. Miller
75cf0679 9fc3e4dc

+1 -1
+1 -1
drivers/net/irda/irda-usb.c
··· 1077 1077 * are "42101001.sb" or "42101002.sb" 1078 1078 */ 1079 1079 sprintf(stir421x_fw_name, "4210%4X.sb", 1080 - self->usbdev->descriptor.bcdDevice); 1080 + le16_to_cpu(self->usbdev->descriptor.bcdDevice)); 1081 1081 ret = request_firmware(&fw, stir421x_fw_name, &self->usbdev->dev); 1082 1082 if (ret < 0) 1083 1083 return ret;