hidpp: use a #define for the wired device index

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-25 12:57:33 +10:00
parent 4fca750977
commit 89728733bf
2 changed files with 3 additions and 2 deletions

View File

@@ -213,8 +213,8 @@ hidpp10drv_probe(struct ratbag_device *device, const struct ratbag_id id)
if (is_unifying_receiver)
dev = hidpp10_device_new_from_wpid(device, id.id.product);
else /* wired devices are 0 */
dev = hidpp10_device_new_from_idx(device, 0);
else
dev = hidpp10_device_new_from_idx(device, WIRED_DEVICE_IDX);
if (!dev) {
log_error(device->ratbag,

View File

@@ -30,6 +30,7 @@
#define HIDPP_GENERIC_H
#define RECEIVER_IDX 0xFF
#define WIRED_DEVICE_IDX 0x00
#define REPORT_ID_SHORT 0x10
#define REPORT_ID_LONG 0x11