From 27293a22df198b60900a19d222225d8f9a308866 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Mon, 9 May 2016 20:09:24 +0200 Subject: [PATCH] hidpp20: enable G900 profile type The profile is retro-compatible with the rest, so we can access it in the same way. Signed-off-by: Benjamin Tissoires --- src/hidpp20.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index 9eece6f5..0a534fc7 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -929,6 +929,7 @@ int hidpp20_adjustable_dpi_set_sensor_dpi(struct hidpp20_device *device, #define HIDPP20_ONBOARD_PROFILES_MEMORY_TYPE_G402 0x01 #define HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G402 0x01 #define HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G303 0x02 +#define HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G900 0x03 #define HIDPP20_ONBOARD_PROFILES_MACRO_TYPE_G402 0x01 struct hidpp20_onboard_profiles_info { @@ -1242,7 +1243,8 @@ hidpp20_onboard_profiles_initialize(struct hidpp20_device *device, } if ((info->profile_format_id != HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G402) && - (info->profile_format_id != HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G303)) { + (info->profile_format_id != HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G303) && + (info->profile_format_id != HIDPP20_ONBOARD_PROFILES_PROFILE_TYPE_G900)) { hidpp_log_error(&device->base, "Profile layout not supported: 0x%02x.\n", info->profile_format_id); @@ -1301,8 +1303,6 @@ hidpp20_onboard_profiles_initialize(struct hidpp20_device *device, break; } - - *profiles_list = profiles; return 0;