From: Rikard Falkeborn Date: Tue, 26 May 2020 21:02:18 +0000 (+0200) Subject: iio: adc: max11100: Constify struct iio_chan_spec X-Git-Tag: v5.9-rc1~119^2~85^2~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce6c3736d9b0162478e7d8a1b725399aa5f6038d;p=thirdparty%2Fkernel%2Flinux.git iio: adc: max11100: Constify struct iio_chan_spec 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c index 3440539cfdba7..b121ca78f8515 100644 --- a/drivers/iio/adc/max11100.c +++ b/drivers/iio/adc/max11100.c @@ -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) |