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

Configure Feed

Select the types of activity you want to include in your feed.

iio: pressure: abp060mg: make abp_config const

Add const qualifier to struct abp_config abp_config[]. 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-23-v1-1-542cfadce9d0@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
5b322dc4 54fde97f

+2 -2
+2 -2
drivers/iio/pressure/abp060mg.c
··· 35 35 int max; 36 36 }; 37 37 38 - static struct abp_config abp_config[] = { 38 + static const struct abp_config abp_config[] = { 39 39 /* mbar & kPa variants */ 40 40 [ABP006KG] = { .min = 0, .max = 6000 }, 41 41 [ABP010KG] = { .min = 0, .max = 10000 }, ··· 165 165 static void abp060mg_init_device(struct iio_dev *indio_dev, unsigned long id) 166 166 { 167 167 struct abp_state *state = iio_priv(indio_dev); 168 - struct abp_config *cfg = &abp_config[id]; 168 + const struct abp_config *cfg = &abp_config[id]; 169 169 170 170 state->scale = cfg->max - cfg->min; 171 171 state->offset = -ABP060MG_MIN_COUNTS;