staging: iio: light: cm3217: check event's validity
In case integration time for the sensor is not properly set,
User space may query the updated value of a sensor before an event
is generated from the sensor. Kernel driver should not send a stale or
invalid event in such cases, else it may impact performance and in some
cases, the user space application may behave in some undesirable way.
This change checks for such invalid events and makes sure such values
are not sent to user space.
Bug
1521699
Change-Id: I46f8d8defb2e63038f5c4947cbbe8e2b26c06f55
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/426819
(cherry picked from commit
106b781a903756f574c9f7130c3db36d6bfe97c3)
Reviewed-on: http://git-master/r/426811
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>