From 4f5d0dffec9959a1f6b24038dd94f1b26d75a8e7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 1 Aug 2019 09:34:00 +1000 Subject: [PATCH] Revert "hidpp20/data: add the G305" This reverts commit cad05ffcedea0bf5f4098d132c09ccac089ec86f. --- data/devices/logitech-g305.device | 7 ------- meson.build | 1 - src/hidpp20.c | 10 ---------- src/hidpp20.h | 2 +- src/libratbag-data.c | 4 ---- 5 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 data/devices/logitech-g305.device diff --git a/data/devices/logitech-g305.device b/data/devices/logitech-g305.device deleted file mode 100644 index ac836597..00000000 --- a/data/devices/logitech-g305.device +++ /dev/null @@ -1,7 +0,0 @@ -[Device] -Name=Logitech Gaming Mouse G305 -DeviceMatch=usb:046d:4074 -Driver=hidpp20 - -[Driver/hidpp20] -Quirk=G305 diff --git a/meson.build b/meson.build index 952f0d5c..7bc995e5 100644 --- a/meson.build +++ b/meson.build @@ -294,7 +294,6 @@ data_files = files( 'data/devices/logitech-g300.device', 'data/devices/logitech-g302.device', 'data/devices/logitech-g303.device', - 'data/devices/logitech-g305.device', 'data/devices/logitech-g402.device', 'data/devices/logitech-g403-hero.device', 'data/devices/logitech-g403-wireless.device', diff --git a/src/hidpp20.c b/src/hidpp20.c index 9f08366c..058f3c06 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -2620,15 +2620,6 @@ hidpp20_onboard_profiles_initialize(struct hidpp20_device *device, HIDPP20_USER_PROFILES_G402, profiles->sector_size, data); - - if (rc && device->quirk != HIDPP20_QUIRK_G305) { - /* The G305 has a bug where it throws an ERR_INVALID_ARGUMENT - if the sector has not been written to yet. If this happens - we will read the ROM profiles.*/ - read_userdata = false; - goto read_profiles; - } - if (rc < 0) return rc; // ignore_clang_sa_mem_leak @@ -2662,7 +2653,6 @@ hidpp20_onboard_profiles_initialize(struct hidpp20_device *device, read_userdata = false; } -read_profiles: for (i = 0; i < profiles->num_profiles; i++) { if (read_userdata) { hidpp_log_debug(&device->base, "Parsing profile %u\n", i); diff --git a/src/hidpp20.h b/src/hidpp20.h index 759872f8..743145b3 100644 --- a/src/hidpp20.h +++ b/src/hidpp20.h @@ -83,8 +83,8 @@ hidpp20_device_destroy(struct hidpp20_device *device); enum { HIDPP20_QUIRK_NONE, - HIDPP20_QUIRK_G305, } +#define HIDPP20_QUIRK_G305 1 /* -------------------------------------------------------------------------- */ /* 0x0000: Root */ diff --git a/src/libratbag-data.c b/src/libratbag-data.c index 738d56d0..7bef8ec5 100644 --- a/src/libratbag-data.c +++ b/src/libratbag-data.c @@ -166,10 +166,6 @@ init_data_hidpp20(struct ratbag *ratbag, str = g_key_file_get_string(keyfile, group, "Quirk", NULL); data->hidpp20.quirk = HIDPP20_QUIRK_NONE; - if (str) { - if (streq(str, "G305")) - data->hidpp20.quirk = HIDPP20_QUIRK_G305; - } } static void