]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
staging: iio: light: cm3217: check event's validity
authorSri Krishna chowdary <schowdary@nvidia.com>
Thu, 19 Jun 2014 06:49:10 +0000 (12:19 +0530)
committerDhiren Parmar <dparmar@nvidia.com>
Sat, 21 Jun 2014 07:52:04 +0000 (00:52 -0700)
commit106b781a903756f574c9f7130c3db36d6bfe97c3
treed27ea309f9ed80a5812fa71892e4dfa2f8c93559
parent6455f05f4f7e95825eeaa3c8b94ad86d7c069ccc
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
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
drivers/staging/iio/light/cm3217.c