]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iio: adc: max11100: Constify struct iio_chan_spec
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Tue, 26 May 2020 21:02:18 +0000 (23:02 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Jun 2020 10:49:33 +0000 (11:49 +0100)
max11100_channels is not modified and can therefore be made const to
allow the compiler to put it in read-only memory.

Before:
   text    data     bss     dec     hex filename
   3776    1168       0    4944    1350 drivers/iio/adc/max11100.o

After:
   text    data     bss     dec     hex filename
   3968     976       0    4944    1350 drivers/iio/adc/max11100.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max11100.c

index 3440539cfdba7323952bed1ba89dace2ff7b2d18..b121ca78f85156f86596bcbc8755a94cdf9771b9 100644 (file)
@@ -37,7 +37,7 @@ struct max11100_state {
        u8 buffer[3] ____cacheline_aligned;
 };
 
-static struct iio_chan_spec max11100_channels[] = {
+static const struct iio_chan_spec max11100_channels[] = {
        { /* [0] */
                .type = IIO_VOLTAGE,
                .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |