summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-09-08 14:57:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-09-15 17:43:20 +0100
commit3704432fb1fd8ab2df114bad6df752381246b609 (patch)
tree554c46e264866bc2be767434586a68bf5ed7c75c /drivers/iio/industrialio-buffer.c
parent9761696f2be276b169b77bcf359bc50a251c9280 (diff)
downloadtalos-op-linux-3704432fb1fd8ab2df114bad6df752381246b609.tar.gz
talos-op-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/industrialio-buffer.c')
-rw-r--r--drivers/iio/industrialio-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 96e97ad2538c..7ea2edbf7614 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -208,7 +208,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
&iio_show_scan_index,
NULL,
0,
- 0,
+ IIO_SEPARATE,
&indio_dev->dev,
&buffer->scan_el_dev_attr_list);
if (ret)
OpenPOWER on IntegriCloud