]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8e48a0984392f6c83c36680d0b698be430b583a8
tree92d2f464550c5955ca58a73358437959c1cf73e6
parent7591abfe33ce2d2e52963bf71254eeae3b246e8c
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