summaryrefslogtreecommitdiffstats
path: root/drivers/iio/frequency
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-09-08 15:57:00 +0200
committerJonathan Cameron <jic23@kernel.org>2013-09-15 18:43:20 +0200
commit3704432fb1fd8ab2df114bad6df752381246b609 (patch)
tree554c46e264866bc2be767434586a68bf5ed7c75c /drivers/iio/frequency
parentiio: drop info_mask from struct iio_dev (diff)
downloadlinux-3704432fb1fd8ab2df114bad6df752381246b609.tar.xz
linux-3704432fb1fd8ab2df114bad6df752381246b609.zip
iio: refactor info mask and ext_info attribute creation.
Introduce an enum to specify whether the attribute is separate or shared. Factor out the bitmap handling for loop into a separate function. Tidy up error handling and add a NULL assignment to squish a false positive warning from GCC. Change ext_info shared type from boolean to enum and update in all drivers. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'drivers/iio/frequency')
-rw-r--r--drivers/iio/frequency/adf4350.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index a7b30be86ae0..85152547aa8b 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -351,6 +351,7 @@ static ssize_t adf4350_read(struct iio_dev *indio_dev,
.read = adf4350_read, \
.write = adf4350_write, \
.private = _ident, \
+ .shared = IIO_SEPARATE, \
}
static const struct iio_chan_spec_ext_info adf4350_ext_info[] = {