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

iio: ltr501: mark ltr501_chip_info as const

This patch marks the struct ltr501_chip_info as constant.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Nikita Travkin <nikita@trvn.ru> # ltr559
Link: https://lore.kernel.org/r/20210610134619.2101372-5-mkl@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marc Kleine-Budde and committed by
Jonathan Cameron
afedd992 71b33f6f

+5 -5
+5 -5
drivers/iio/light/ltr501.c
··· 152 152 struct ltr501_data { 153 153 struct i2c_client *client; 154 154 struct mutex lock_als, lock_ps; 155 - struct ltr501_chip_info *chip_info; 155 + const struct ltr501_chip_info *chip_info; 156 156 u8 als_contr, ps_contr; 157 157 int als_period, ps_period; /* period in micro seconds */ 158 158 struct regmap *regmap; ··· 739 739 { 740 740 struct ltr501_data *data = iio_priv(indio_dev); 741 741 int i, ret, freq_val, freq_val2; 742 - struct ltr501_chip_info *info = data->chip_info; 742 + const struct ltr501_chip_info *info = data->chip_info; 743 743 744 744 ret = iio_device_claim_direct_mode(indio_dev); 745 745 if (ret) ··· 1086 1086 char *buf) 1087 1087 { 1088 1088 struct ltr501_data *data = iio_priv(dev_to_iio_dev(dev)); 1089 - struct ltr501_chip_info *info = data->chip_info; 1089 + const struct ltr501_chip_info *info = data->chip_info; 1090 1090 ssize_t len = 0; 1091 1091 int i; 1092 1092 ··· 1108 1108 char *buf) 1109 1109 { 1110 1110 struct ltr501_data *data = iio_priv(dev_to_iio_dev(dev)); 1111 - struct ltr501_chip_info *info = data->chip_info; 1111 + const struct ltr501_chip_info *info = data->chip_info; 1112 1112 ssize_t len = 0; 1113 1113 int i; 1114 1114 ··· 1188 1188 .write_event_config = &ltr501_write_event_config, 1189 1189 }; 1190 1190 1191 - static struct ltr501_chip_info ltr501_chip_info_tbl[] = { 1191 + static const struct ltr501_chip_info ltr501_chip_info_tbl[] = { 1192 1192 [ltr501] = { 1193 1193 .partid = 0x08, 1194 1194 .als_gain = ltr501_als_gain_tbl,