]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: pressure: bmp280: Constify struct regmap_bus
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Wed, 3 Jul 2024 21:04:53 +0000 (23:04 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Jul 2024 19:31:10 +0000 (20:31 +0100)
commit244315b317350ad14a2f24b021f73c9dfcf83595
treefe0c8c96caa484d12b4c4323396c6a321513d52c
parent9abedf82c78505b9f9c8d9670cd06e67532eed71
iio: pressure: bmp280: Constify struct regmap_bus

`bmp280_regmap_bus` and `bmp380_regmap_bus` are conditionally assigned
to `bmp_regmap_bus`, which is only used to pass the struct as a
read-only member.

Add the const modifier to the structs and the pointer to move the data
to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Tested-By: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20240703-iio-cont-regmap_bus-v1-10-34754f355b65@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/bmp280-spi.c