diff options
author | Jonathan Cameron <jic23@kernel.org> | 2013-09-08 15:57:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-15 18:43:20 +0200 |
commit | 3704432fb1fd8ab2df114bad6df752381246b609 (patch) | |
tree | 554c46e264866bc2be767434586a68bf5ed7c75c /drivers/iio/dac/ad5686.c | |
parent | iio: drop info_mask from struct iio_dev (diff) | |
download | linux-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/dac/ad5686.c')
-rw-r--r-- | drivers/iio/dac/ad5686.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 3e1080feedbf..f472b48445f6 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c @@ -264,8 +264,9 @@ static const struct iio_chan_spec_ext_info ad5686_ext_info[] = { .name = "powerdown", .read = ad5686_read_dac_powerdown, .write = ad5686_write_dac_powerdown, + .shared = IIO_SEPARATE, }, - IIO_ENUM("powerdown_mode", false, &ad5686_powerdown_mode_enum), + IIO_ENUM("powerdown_mode", IIO_SEPARATE, &ad5686_powerdown_mode_enum), IIO_ENUM_AVAILABLE("powerdown_mode", &ad5686_powerdown_mode_enum), { }, }; |