• Lars-Peter Clausen's avatar
    staging:iio: Constify static iio_chan_spec arrays · f4e4b955
    Lars-Peter Clausen authored
    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: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    f4e4b955
lpc32xx_adc.c 6.22 KB