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

iio: light: zopt2201: make zopt2201_scale const

Add const qualifier to struct zopt2201_scale zopt2201_scale_*[]. 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-22-v1-1-fc9ebdc5f5c3@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
54fde97f d94fc241

+3 -3
+3 -3
drivers/iio/light/zopt2201.c
··· 119 119 u8 res; /* resolution register value */ 120 120 }; 121 121 122 - static struct zopt2201_scale zopt2201_scale_als[] = { 122 + static const struct zopt2201_scale zopt2201_scale_als[] = { 123 123 { 19, 200000, 0, 5 }, 124 124 { 6, 400000, 1, 5 }, 125 125 { 3, 200000, 2, 5 }, ··· 144 144 { 0, 8333, 4, 0 }, 145 145 }; 146 146 147 - static struct zopt2201_scale zopt2201_scale_uvb[] = { 147 + static const struct zopt2201_scale zopt2201_scale_uvb[] = { 148 148 { 0, 460800, 0, 5 }, 149 149 { 0, 153600, 1, 5 }, 150 150 { 0, 76800, 2, 5 }, ··· 347 347 } 348 348 349 349 static int zopt2201_write_scale_by_idx(struct zopt2201_data *data, int idx, 350 - struct zopt2201_scale *zopt2201_scale_array) 350 + const struct zopt2201_scale *zopt2201_scale_array) 351 351 { 352 352 int ret; 353 353