OSDN Git Service

STPK-1429 Fix a major SNAFU in iio device report handling
authorPatrick Porlan <patrick.porlan@intel.com>
Mon, 7 Apr 2014 13:23:47 +0000 (15:23 +0200)
committersuyyala <sridhar.uyyala@intel.com>
Mon, 28 Apr 2014 02:40:39 +0000 (19:40 -0700)
commit11213204d2042363bfba9e10cf0cfde359562d98
tree90d3ea0e2dac22b5cff9ce4e9c32fac4afebed01
parent816bba686f5c70100cf825b3894e808f58e30ab8
STPK-1429 Fix a major SNAFU in iio device report handling

The code computing the number of bytes to read from the
iio character device made the assumption that the location
of the sensor reports within the device report change when
a sensor gets enabled or disabled. That's incorrect.

It worked so far in most cases by luck: either we had one
device per sensor, as with the XPS, or the co-located
sensors were enabled/disabled in order, e.g. accelerometer
enabled whenever we used the gyroscope. Now the gyroscope
works whatever the status of the rotation lock is...

Issue: STPK-1429

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