iio: adc: xilinx: constify iio_buffer_setup_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 15 Nov 2015 20:00:02 +0000 (21:00 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 18 Nov 2015 19:04:01 +0000 (19:04 +0000)
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>
drivers/iio/adc/xilinx-xadc-core.c

index 0370624a35db723a6b6089c99398cca36fc10590..c2b5f10958482edb86800849c2c9c8ac6e9f6112 100644 (file)
@@ -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,