From 670720b40fa4de694409c95a581d78f13dba746e Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Mon, 9 Oct 2017 19:12:00 +0200 Subject: [PATCH] hidpp20: fix .type parsing for sw_leds struct hidpp20_led_sw_ctrl_led_info holds a u8 for the .type field. Attempting to convert a value which is already a u8 ends up setting 0 and thus discarding the type information. Fix by removing the extra step. Signed-off-by: Benjamin Tissoires --- src/hidpp20.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index fe9d8a32..be5440b3 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -552,7 +552,6 @@ int hidpp20_led_sw_control_get_led_info(struct hidpp20_device* device, return -ENOENT; params = (struct hidpp20_led_sw_ctrl_led_info*) msg.msg.parameters; - params->type = hidpp_be_u16_to_cpu(params->type); params->caps = hidpp_be_u16_to_cpu(params->caps); *info = *params;