]> git.karo-electronics.de Git - linux-beck.git/commit
staging:iio: Constify static iio_chan_spec arrays
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 9 Aug 2012 07:51:00 +0000 (08:51 +0100)
committerJonathan Cameron <jic23@kernel.org>
Tue, 14 Aug 2012 19:27:42 +0000 (20:27 +0100)
commitf4e4b9558bc696cc89de460e754d3fecb50b13cb
tree93fee7877db90456bae2bfebe61ed14d70fb2acf
parent8e3829c61b489933e58f671ac111a2f1980563d4
staging:iio: Constify static iio_chan_spec arrays

The per driver iio_chan_spec arrays are usually shared between multiple device
instances. So a single device instance may not modify the iio_chan_spec array
since this would also affect the other device instances. To make this restriction
explicit mark the per driver iio_chan_spec arrays as const.

Conversion was done automatically using the following coccinelle semantic patch:

// <smpl>
@disable optional_qualifier@
identifier channels;
@@
static
+const
struct iio_chan_spec channels[] = ...;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
22 files changed:
drivers/staging/iio/accel/adis16201_core.c
drivers/staging/iio/accel/adis16203_core.c
drivers/staging/iio/accel/adis16204_core.c
drivers/staging/iio/accel/adis16209_core.c
drivers/staging/iio/accel/adis16240_core.c
drivers/staging/iio/accel/kxsd9.c
drivers/staging/iio/accel/lis3l02dq_core.c
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/iio/adc/ad7192.c
drivers/staging/iio/adc/ad7298_core.c
drivers/staging/iio/adc/ad7606.h
drivers/staging/iio/adc/ad7606_core.c
drivers/staging/iio/adc/lpc32xx_adc.c
drivers/staging/iio/adc/max1363.h
drivers/staging/iio/adc/max1363_core.c
drivers/staging/iio/adc/spear_adc.c
drivers/staging/iio/iio_simple_dummy.c
drivers/staging/iio/impedance-analyzer/ad5933.c
drivers/staging/iio/imu/adis16400_core.c
drivers/staging/iio/meter/ade7758.h
drivers/staging/iio/meter/ade7758_core.c
drivers/staging/iio/resolver/ad2s1210.c