]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging:iio: Don't compare boolean values with true/false
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 18 Oct 2012 14:43:00 +0000 (15:43 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 19 Oct 2012 15:19:45 +0000 (16:19 +0100)
Fixes the following coccicheck warnings:
drivers/staging/iio/accel/lis3l02dq_ring.c:240:5-10: WARNING: Comparison to bool
drivers/staging/iio/iio_dummy_evgen.c:111:6-25: WARNING: Comparison to bool

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/accel/lis3l02dq_ring.c
drivers/staging/iio/iio_dummy_evgen.c

index 13c0b4bd5baa60dd7adb6169f041edf9635573c3..246352716537cf363cf456fd6dd802aa03e779b4 100644 (file)
@@ -237,7 +237,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
        u8 t;
 
        __lis3l02dq_write_data_ready_config(indio_dev, state);
-       if (state == false) {
+       if (!state) {
                /*
                 * A possible quirk with the handler is currently worked around
                 * by ensuring outstanding read events are cleared.
index 74e24e8aa8768d40cbdfc8f93810056e23548dec..132d278c5010b3e0945d543140a9fb12f44dfefa 100644 (file)
@@ -108,7 +108,7 @@ int iio_dummy_evgen_get_irq(void)
 
        mutex_lock(&iio_evgen->lock);
        for (i = 0; i < IIO_EVENTGEN_NO; i++)
-               if (iio_evgen->inuse[i] == false) {
+               if (!iio_evgen->inuse[i]) {
                        ret = iio_evgen->base + i;
                        iio_evgen->inuse[i] = true;
                        break;