diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-24 10:55:13 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-26 12:11:34 +1000 |
commit | 8bb3786fead14c36fbfb6320e886e3a0e878b29f (patch) | |
tree | 06a94f63edac6c603fff7df5a6be14b6699b63ce /src | |
parent | be83094bd98c353b0ee7894eefcb1ae91e0cae30 (diff) |
Use struct input_id as return value for EVIOCGID
struct input_id is an array of 4 ushorts so there is no real change in
functionality.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/eventcomm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index 30007ab..fed8ce2 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -180,17 +180,17 @@ static model_lookup_t model_lookup_table[] = { static Bool event_query_model(int fd, enum TouchpadModel *model_out) { - short id[4]; + struct input_id id; int rc; model_lookup_t *model_lookup; - SYSCALL(rc = ioctl(fd, EVIOCGID, id)); + SYSCALL(rc = ioctl(fd, EVIOCGID, &id)); if (rc < 0) return FALSE; for(model_lookup = model_lookup_table; model_lookup->vendor; model_lookup++) { - if(model_lookup->vendor == id[ID_VENDOR] && - (model_lookup->product == id[ID_PRODUCT] || model_lookup->product == PRODUCT_ANY)) + if(model_lookup->vendor == id.vendor && + (model_lookup->product == id.product|| model_lookup->product == PRODUCT_ANY)) *model_out = model_lookup->model; } |