OSDN Git Service

Fix type of recently introduced semi arbitrated sampling rate
[android-x86/hardware-intel-libsensors.git] / control.c
index c527a55..b8fdeab 100644 (file)
--- a/control.c
+++ b/control.c
 #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                         */
@@ -1168,7 +1159,7 @@ static void stamp_reports (int dev_num, int64_t ts)
 
        for (s=0; s<MAX_SENSORS; s++)
                if (sensor[s].dev_num == dev_num && is_enabled(s) && sensor[s].mode != MODE_POLL)
-                       sensor[s].report_ts = ts;
+                       set_report_ts(s, ts);
 }
 
 
@@ -1263,6 +1254,7 @@ static int integrate_device_report_from_dev(int dev_num, int fd)
        boot_to_rt_delta = get_timestamp_boot() - get_timestamp_realtime();
 
        stamp_reports(dev_num, ts + boot_to_rt_delta);
+
        return 0;
 }