Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: amplifiers: ad8366: make ad8366_info const

Add const qualifier to struct ad8366_info ad8366_infos[]. 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-12-v1-1-88029e48a26b@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
9d531de2 0084ccd7

+3 -3
+3 -3
drivers/iio/amplifiers/ad8366.c
··· 45 45 struct gpio_desc *reset_gpio; 46 46 unsigned char ch[2]; 47 47 enum ad8366_type type; 48 - struct ad8366_info *info; 48 + const struct ad8366_info *info; 49 49 /* 50 50 * DMA (thus cache coherency maintenance) may require the 51 51 * transfer buffers to live in their own cache lines. ··· 53 53 unsigned char data[2] __aligned(IIO_DMA_MINALIGN); 54 54 }; 55 55 56 - static struct ad8366_info ad8366_infos[] = { 56 + static const struct ad8366_info ad8366_infos[] = { 57 57 [ID_AD8366] = { 58 58 .gain_min = 4500, 59 59 .gain_max = 20500, ··· 163 163 long mask) 164 164 { 165 165 struct ad8366_state *st = iio_priv(indio_dev); 166 - struct ad8366_info *inf = st->info; 166 + const struct ad8366_info *inf = st->info; 167 167 int code = 0, gain; 168 168 int ret; 169 169