OSDN Git Service

Be more careful with the amount of data we read from the iio dev fd
authorPatrick Porlan <patrick.porlan@intel.com>
Fri, 21 Nov 2014 10:53:15 +0000 (11:53 +0100)
committerGerrit Code Review <gerrit@mcg-psi-gcr1.jf.intel.com>
Fri, 21 Nov 2014 14:59:43 +0000 (06:59 -0800)
commitbbcca4977704f8c1f24eedf06c8eb2d22b7c7acb
treee8cd187958444c71f3d09d84c5a3d7eb7606b92e
parent802446dfb679dce5ae8451b41e4652aaf72903de
Be more careful with the amount of data we read from the iio dev fd

The iio drivers we have operate with a buffer length set at 2, and
can be set at larger sizes, however the current event integration
code path only handles a iio device report per loop.

For now, simply make sure we only read a single "scan", a.k.a. iio
device report, per loop. This could avoid dropping events if the
driver is producing them faster than we can consume them.

Change-Id: Ibfad7abbd445d6aae0345e2c828ca72c555c42ea
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
common.h
control.c