hidpp20: color effects, fix endianness

We are receiving big endian, thus the weird power of two locations.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2017-05-23 14:22:50 +02:00
committed by bentiss
parent 7afd59149c
commit 15dd6b4f2b
2 changed files with 3 additions and 3 deletions

View File

@@ -149,8 +149,8 @@ struct hidpp20_8070_location_mapping {
static const struct hidpp20_8070_location_mapping hidpp20_8070_location_mapping[] = {
LED_LOC_MAPPING(0, "None", RATBAG_LED_TYPE_UNKNOWN),
LED_LOC_MAPPING(256, "Logo LED", RATBAG_LED_TYPE_LOGO),
LED_LOC_MAPPING(512, "Side LED", RATBAG_LED_TYPE_SIDE),
LED_LOC_MAPPING(1, "Logo LED", RATBAG_LED_TYPE_LOGO),
LED_LOC_MAPPING(2, "Side LED", RATBAG_LED_TYPE_SIDE),
};
const struct ratbag_button_action *

View File

@@ -555,7 +555,7 @@ hidpp20_color_led_effects_get_zone_info(struct hidpp20_device *device,
return rc;
msg_info = (struct hidpp20_color_led_zone_info *)msg.msg.parameters;
info->location = msg_info->location;
info->location = hidpp_be_u16_to_cpu(msg_info->location);
info->num_effects = msg_info->num_effects;
info->persistency_caps = msg_info->persistency_caps;