[PATCH synaptics 1/2] Use struct input_id as return value for EVIOCGID
Peter Hutterer
peter.hutterer at who-t.net
Mon May 23 18:59:01 PDT 2011
struct input_id is an array of 4 ushorts so there is no real change in
functionality.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
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;
}
--
1.7.4.4
More information about the xorg-devel
mailing list