]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: adc: mp2629_adc: make mp2629_channels const
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Jun 2025 16:31:02 +0000 (11:31 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Jul 2025 09:37:52 +0000 (10:37 +0100)
Add const qualifier to struct iio_chan_spec mp2629_channels[]. This
is read-only data so it can be made const.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250628-iio-const-data-8-v1-1-32ce79494d4a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/mp2629_adc.c

index 1cb043b17437780970ce355f9d93fd36cbd26826..5a1d516f8dad8e2cf46a43e1a40d1cc7adaecc13 100644 (file)
@@ -44,7 +44,7 @@ struct mp2629_adc {
        struct device *dev;
 };
 
-static struct iio_chan_spec mp2629_channels[] = {
+static const struct iio_chan_spec mp2629_channels[] = {
        MP2629_ADC_CHAN(BATT_VOLT, IIO_VOLTAGE),
        MP2629_ADC_CHAN(SYSTEM_VOLT, IIO_VOLTAGE),
        MP2629_ADC_CHAN(INPUT_VOLT, IIO_VOLTAGE),