diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-08-09 07:51:00 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-08-14 19:27:42 (GMT) |
commit | f4e4b9558bc696cc89de460e754d3fecb50b13cb (patch) | |
tree | 93fee7877db90456bae2bfebe61ed14d70fb2acf /drivers/staging/iio/accel/kxsd9.c | |
parent | 8e3829c61b489933e58f671ac111a2f1980563d4 (diff) | |
download | linux-fsl-qoriq-f4e4b9558bc696cc89de460e754d3fecb50b13cb.tar.xz |
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>
Diffstat (limited to 'drivers/staging/iio/accel/kxsd9.c')
-rw-r--r-- | drivers/staging/iio/accel/kxsd9.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/accel/kxsd9.c b/drivers/staging/iio/accel/kxsd9.c index 8cf7cd9..713469f 100644 --- a/drivers/staging/iio/accel/kxsd9.c +++ b/drivers/staging/iio/accel/kxsd9.c @@ -186,7 +186,7 @@ error_ret: .address = KXSD9_REG_##axis, \ } -static struct iio_chan_spec kxsd9_channels[] = { +static const struct iio_chan_spec kxsd9_channels[] = { KXSD9_ACCEL_CHAN(X), KXSD9_ACCEL_CHAN(Y), KXSD9_ACCEL_CHAN(Z), { .type = IIO_VOLTAGE, |