From fc13c15fe2c33e1e30513466a444aad0326e58aa Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Sun, 13 Sep 2015 18:17:09 +0200 Subject: [PATCH] hidraw: only show the report IDs once --- src/libratbag-hidraw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libratbag-hidraw.c b/src/libratbag-hidraw.c index 0b5b16a2..c75618f3 100644 --- a/src/libratbag-hidraw.c +++ b/src/libratbag-hidraw.c @@ -74,9 +74,10 @@ ratbag_hidraw_parse_report_descriptor(struct ratbag_device *device) for (j = 0; j < size; j++) { report_id |= report_desc.value[i + j + 1] << ((size - j - 1) * 8); - log_debug(device->ratbag, "report ID %02x\n", report_id); - if (hidraw->report_ids) + if (hidraw->report_ids) { + log_debug(device->ratbag, "report ID %02x\n", report_id); hidraw->report_ids[hidraw->num_report_ids] = report_id; + } hidraw->num_report_ids++; } }