linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Jiri Kosina <jikos@kernel.org>, linux-input@vger.kernel.org
Subject: [PATCH] hid: hid-led: fix Delcom support on big endian systems
Date: Fri, 8 Jul 2016 06:58:37 +0200	[thread overview]
Message-ID: <c65d7daa-e057-8aab-7e3e-2e88bf896061@gmail.com> (raw)

Properly handle this __le16 value on big endian systems.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/hid/hid-led.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-led.c b/drivers/hid/hid-led.c
index 4c43ef8..d8d55f3 100644
--- a/drivers/hid/hid-led.c
+++ b/drivers/hid/hid-led.c
@@ -327,7 +327,7 @@ static int delcom_init(struct hidled_device *ldev)
 	 * Several Delcom devices share the same USB VID/PID
 	 * Check for family id 2 for Visual Signal Indicator
 	 */
-	return dp.fw.family_code == 2 ? 0 : -ENODEV;
+	return le16_to_cpu(dp.fw.family_code) == 2 ? 0 : -ENODEV;
 }
 
 static int luxafor_write(struct led_classdev *cdev, enum led_brightness br)
-- 
2.9.0


             reply	other threads:[~2016-07-08  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08  4:58 Heiner Kallweit [this message]
2016-07-08 10:38 ` [PATCH] hid: hid-led: fix Delcom support on big endian systems Jiri Kosina

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=c65d7daa-e057-8aab-7e3e-2e88bf896061@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).