netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts
@ 2017-05-12 10:11 Johan Hovold
  2017-05-12 16:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2017-05-12 10:11 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: netdev, Johan Hovold, stable, Nick Fedchik

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>
---
 drivers/net/irda/irda-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 8716b8c07feb..6f3c805f7211 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -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;
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts
  2017-05-12 10:11 [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts Johan Hovold
@ 2017-05-12 16:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-05-12 16:16 UTC (permalink / raw)
  To: johan; +Cc: samuel, netdev, stable, nfedchik

From: Johan Hovold <johan@kernel.org>
Date: Fri, 12 May 2017 12:11:13 +0200

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-12 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12 10:11 [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts Johan Hovold
2017-05-12 16:16 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).