public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel•org>
To: Samuel Ortiz <samuel@sortiz•org>
Cc: netdev@vger•kernel.org, Johan Hovold <johan@kernel•org>,
	stable <stable@vger•kernel.org>,
	Nick Fedchik <nfedchik@atlantic-link•com.ua>
Subject: [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts
Date: Fri, 12 May 2017 12:11:13 +0200	[thread overview]
Message-ID: <20170512101113.1935-1-johan@kernel.org> (raw)

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

             reply	other threads:[~2017-05-12 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 10:11 Johan Hovold [this message]
2017-05-12 16:16 ` [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170512101113.1935-1-johan@kernel.org \
    --to=johan@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nfedchik@atlantic-link$(echo .)com.ua \
    --cc=samuel@sortiz$(echo .)org \
    --cc=stable@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox