From eb4520a1ecbd1a14b83ba942e92d08e32c9c449e Mon Sep 17 00:00:00 2001 From: Patrick Porlan Date: Fri, 6 Feb 2015 15:14:07 +0100 Subject: [PATCH] Unbreak branch Change-Id: I36fa31bc870354ac6f727b4140b0e158e6cb04aa Signed-off-by: Patrick Porlan --- control.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/control.c b/control.c index 1ffb5e3..018ebf2 100644 --- a/control.c +++ b/control.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "control.h" #include "enumeration.h" #include "utils.h" @@ -22,6 +22,15 @@ #include "description.h" #include "filtering.h" +/* Couple of temporary defines until we get a suitable linux/iio/events.h include */ + +struct iio_event_data { + __u64 id; + __s64 timestamp; +}; + +#define IIO_GET_EVENT_FD_IOCTL _IOR('i', 0x90, int) + /* Currently active sensors count, per device */ static int poll_sensors_per_dev[MAX_DEVICES]; /* poll-mode sensors */ static int trig_sensors_per_dev[MAX_DEVICES]; /* trigger, event based */ @@ -1277,7 +1286,7 @@ static int integrate_device_report_from_event(int dev_num, int fd) ts = event.timestamp; - ALOGV("Read event %ld from fd %d of iio device %d\n", event.id, fd, dev_num); + ALOGV("Read event %lld from fd %d of iio device %d\n", event.id, fd, dev_num); /* Map device report to sensor reports */ for (s = 0; s < MAX_SENSORS; s++) -- 2.11.0