diff options
author | Lars-Peter Clausen | 2012-08-09 09:51:00 +0200 |
---|---|---|
committer | Jonathan Cameron | 2012-08-14 21:27:42 +0200 |
commit | f4e4b9558bc696cc89de460e754d3fecb50b13cb (patch) | |
tree | 93fee7877db90456bae2bfebe61ed14d70fb2acf /drivers/staging/iio/adc/ad7192.c | |
parent | staging:iio:adis16220: Use kobj_to_dev instead of open-coding it (diff) | |
download | kernel-qcow2-linux-f4e4b9558bc696cc89de460e754d3fecb50b13cb.tar.gz kernel-qcow2-linux-f4e4b9558bc696cc89de460e754d3fecb50b13cb.tar.xz kernel-qcow2-linux-f4e4b9558bc696cc89de460e754d3fecb50b13cb.zip |
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/adc/ad7192.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7192.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 22c3923d55eb..e381d4b5a6ed 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -967,7 +967,7 @@ static const struct iio_info ad7195_info = { .scan_index = _si, \ .scan_type = IIO_ST('s', 24, 32, 0)} -static struct iio_chan_spec ad7192_channels[] = { +static const struct iio_chan_spec ad7192_channels[] = { AD7192_CHAN_DIFF(1, 2, NULL, AD7192_CH_AIN1P_AIN2M, 0), AD7192_CHAN_DIFF(3, 4, NULL, AD7192_CH_AIN3P_AIN4M, 1), AD7192_CHAN_TEMP(0, AD7192_CH_TEMP, 2), |