提交 f4c109b6 编写于 作者: H Heiner Kallweit 提交者: Jiri Kosina

HID: hid-led: fix Delcom support on big endian systems

Properly handle this __le16 value on big endian systems.
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 9d1e048c
...@@ -327,7 +327,7 @@ static int delcom_init(struct hidled_device *ldev) ...@@ -327,7 +327,7 @@ static int delcom_init(struct hidled_device *ldev)
* Several Delcom devices share the same USB VID/PID * Several Delcom devices share the same USB VID/PID
* Check for family id 2 for Visual Signal Indicator * 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) static int luxafor_write(struct led_classdev *cdev, enum led_brightness br)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册