* [PATCH] hid: hid-led: fix Delcom support on big endian systems
@ 2016-07-08 4:58 Heiner Kallweit
2016-07-08 10:38 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2016-07-08 4:58 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Jiri Kosina, linux-input
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hid: hid-led: fix Delcom support on big endian systems
2016-07-08 4:58 [PATCH] hid: hid-led: fix Delcom support on big endian systems Heiner Kallweit
@ 2016-07-08 10:38 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2016-07-08 10:38 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Benjamin Tissoires, linux-input
On Fri, 8 Jul 2016, Heiner Kallweit wrote:
> 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;
> }
Applied to for-4.8/hid-led. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-08 10:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08 4:58 [PATCH] hid: hid-led: fix Delcom support on big endian systems Heiner Kallweit
2016-07-08 10:38 ` Jiri Kosina
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).