diff options
author | Cristina Moraru <cristina.moraru09@gmail.com> | 2015-10-20 19:55:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-25 02:32:09 (GMT) |
commit | ac1640fbd833b6dfaab1cc8e08ec1e511be189a8 (patch) | |
tree | 8313594b127f0de7db966d8ef449e1ab168fa976 /drivers/staging/iio/trigger | |
parent | 97deb1bc1183f8d91f0ebde1403980e5f9429f6e (diff) | |
download | linux-ac1640fbd833b6dfaab1cc8e08ec1e511be189a8.tar.xz |
staging: iio: trigger: Remove explicit comparisons
Remove comparisons to 0 or NULL
Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/trigger')
-rw-r--r-- | drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 4 | ||||
-rw-r--r-- | drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c index 9fe48ef..035dd45 100644 --- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c +++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c @@ -100,7 +100,7 @@ static ssize_t iio_bfin_tmr_frequency_store(struct device *dev, if (enabled) disable_gptimers(st->t->bit); - if (val == 0) + if (!val) return count; val = get_sclk() / val; @@ -125,7 +125,7 @@ static ssize_t iio_bfin_tmr_frequency_show(struct device *dev, unsigned int period = get_gptimer_period(st->t->id); unsigned long val; - if (period == 0) + if (!period) val = 0; else val = get_sclk() / get_gptimer_period(st->t->id); diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index 2db8857..00d1393 100644 --- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -39,7 +39,7 @@ static int iio_trig_periodic_rtc_set_state(struct iio_trigger *trig, bool state) dev_dbg(&trig_info->rtc->dev, "trigger frequency is %u\n", trig_info->frequency); ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, state); - if (ret == 0) + if (!ret) trig_info->state = state; return ret; |