iio: refactor info mask and ext_info attribute creation.
authorJonathan Cameron <jic23@kernel.org>
Sun, 8 Sep 2013 13:57:00 +0000 (14:57 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 15 Sep 2013 16:43:20 +0000 (17:43 +0100)
commit3704432fb1fd8ab2df114bad6df752381246b609
tree554c46e264866bc2be767434586a68bf5ed7c75c
parent9761696f2be276b169b77bcf359bc50a251c9280
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>
15 files changed:
drivers/iio/dac/ad5064.c
drivers/iio/dac/ad5380.c
drivers/iio/dac/ad5446.c
drivers/iio/dac/ad5504.c
drivers/iio/dac/ad5624r_spi.c
drivers/iio/dac/ad5686.c
drivers/iio/dac/ad5755.c
drivers/iio/dac/ad5791.c
drivers/iio/dac/ad7303.c
drivers/iio/dac/mcp4725.c
drivers/iio/frequency/adf4350.c
drivers/iio/iio_core.h
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c
include/linux/iio/iio.h