Browse Source

iio: adc: xilinx: constify iio_buffer_setup_ops structure

The iio_buffer_setup_ops structures are never modified, so declare this one
as const, like the others.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Julia Lawall 9 years ago
parent
commit
cef7e12585
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/iio/adc/xilinx-xadc-core.c

+ 1 - 1
drivers/iio/adc/xilinx-xadc-core.c

@@ -803,7 +803,7 @@ err:
 	return ret;
 }
 
-static struct iio_buffer_setup_ops xadc_buffer_ops = {
+static const struct iio_buffer_setup_ops xadc_buffer_ops = {
 	.preenable = &xadc_preenable,
 	.postenable = &iio_triggered_buffer_postenable,
 	.predisable = &iio_triggered_buffer_predisable,