OSDN Git Service
STPK-1429 Make the sensor enable/disable code path more robust
Tests on the number of enabled sensors can be replaced by a
check on the iio device fd status (having any sensor active
on a iio device implies that the associated device was open).
This simplifies the enable path somewhat. On the disable path
we still need to check whether a regular or poll-mode sensor
associated to the device remains in operation before actually
closing the fd and setting it back to -1.
Issue: STPK-1429
Change-Id: Ib3084d0075630d48ffb97bcdd01b880271b3192c
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>