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 <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2017-10-09 19:12:00 +02:00
parent 0787e35964
commit 670720b40f

View File

@@ -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;