iio: core: constitfy available_scan_mask
authorMichael Hennerich <michael.hennerich@analog.com>
Wed, 22 Feb 2012 12:16:49 +0000 (13:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:14:04 +0000 (12:14 -0800)
commitcd4361c7e2e0778016a770157d0ccf126fca7a2a
tree92d2f464550c5955ca58a73358437959c1cf73e6
parent004d81339a3039e6402aa1ab73c5f986c9036786
iio: core: constitfy available_scan_mask

The core must not modify available_scan_mask, because it causes problems
with drivers where multiple instances of the driver share the same mask set.
So make this explicit by marking available scan masks as const.

The max1363 driver needs some minor adjustment to accommodate this change.
Pull scan mask allocation into a separate function.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/max1363_core.c
drivers/staging/iio/iio.h
drivers/staging/iio/industrialio-buffer.c