From 6b4cd7b76ee7ed4fb6c74d3876a73979b3669536 Mon Sep 17 00:00:00 2001 From: Giorgi Tchankvetadze Date: Mon, 23 Mar 2026 10:46:41 +0400 Subject: iio: adc: max11410: make vref register name arrays static const The vrefp_regs and vrefn_regs arrays are constant lookup tables and are not modified. Make them static const so they are not reinitialized on each probe call and are placed in read-only memory. Mark the pointer array as const as well to prevent unintended modification. Signed-off-by: Giorgi Tchankvetadze Signed-off-by: Jonathan Cameron --- drivers/iio/adc/max11410.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/max11410.c b/drivers/iio/adc/max11410.c index 511b2f14dfaf..69351f4f10bb 100644 --- a/drivers/iio/adc/max11410.c +++ b/drivers/iio/adc/max11410.c @@ -912,8 +912,8 @@ static int max11410_self_calibrate(struct max11410_state *st) static int max11410_probe(struct spi_device *spi) { - const char *vrefp_regs[] = { "vref0p", "vref1p", "vref2p" }; - const char *vrefn_regs[] = { "vref0n", "vref1n", "vref2n" }; + static const char * const vrefp_regs[] = { "vref0p", "vref1p", "vref2p" }; + static const char * const vrefn_regs[] = { "vref0n", "vref1n", "vref2n" }; struct device *dev = &spi->dev; struct max11410_state *st; struct iio_dev *indio_dev; -- cgit v1.2.3