projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5714d0c
)
staging:iio:ad7291 faciliate ad7291_read_event_config()
author
Hartmut Knaack
<knaack.h@gmx.de>
Thu, 7 Aug 2014 11:06:00 +0000
(12:06 +0100)
committer
Jonathan Cameron
<jic23@kernel.org>
Tue, 8 Jul 2014 20:14:41 +0000
(21:14 +0100)
Save some lines in returning a voltage event.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7291.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/iio/adc/ad7291.c
b/drivers/staging/iio/adc/ad7291.c
index 0ec6454b33a15a7e58ba7a96d61af8b190e30628..40f1cea25e1fc8faaad5dc3647a0ed0800f4d588 100644
(file)
--- a/
drivers/staging/iio/adc/ad7291.c
+++ b/
drivers/staging/iio/adc/ad7291.c
@@
-247,10
+247,7
@@
static int ad7291_read_event_config(struct iio_dev *indio_dev,
switch (chan->type) {
case IIO_VOLTAGE:
- if (chip->c_mask & BIT(15 - chan->channel))
- return 1;
- else
- return 0;
+ return !!(chip->c_mask & BIT(15 - chan->channel));
case IIO_TEMP:
/* always on */
return 1;
This page took
0.024848 seconds
and
5
git commands to generate.