]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
staging: iio: light: cm3217: check event's validity origin/rel-20-mp1 daily-2014.07.30.0_rel-20-mp1-partner
authorSri Krishna chowdary <schowdary@nvidia.com>
Thu, 19 Jun 2014 06:49:10 +0000 (12:19 +0530)
committerTodd Poynter <tpoynter@nvidia.com>
Tue, 24 Jun 2014 20:26:25 +0000 (13:26 -0700)
commit774d30a515c199cff7fb421e201dae4d493086ee
treeb2469d5fd8119e18027852bd126911fe386cecb2
parent9960b2cc4cb558c878228f1455500060f11f9391
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>
drivers/staging/iio/light/cm3217.c