iio: bmc150: exit early if event / trigger state is not changed
authorOctavian Purdila <octavian.purdila@intel.com>
Sat, 31 Jan 2015 00:00:05 +0000 (02:00 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Feb 2015 10:40:25 +0000 (10:40 +0000)
commit14ee64f438b8e85d1c78939d301956d9a775cc9a
treee73c5e7181cd6f60aeadcb5abad2345f338fee2c
parent8e22f477e1432ace88b762f5f66e0f96631a1462
iio: bmc150: exit early if event / trigger state is not changed

Previous of this patch the check was only done if we enabled the event
and it was already enabled. We can do the same if the event is
disabled and we want to disable it.

The patch also adds the same check on the trigger code.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bmc150-accel.c