summaryrefslogtreecommitdiff
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-07-03 23:04:45 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-07-29 20:31:09 +0100
commit867ade7dc0756ff656e3b14afea87c8a35880a08 (patch)
tree149f28cd326148d8effec3c3af1b1eb60affc617 /drivers/iio/accel
parentc922c634bd926d84967275efbb7275b8645aa343 (diff)
iio: accel: bma400: Constify struct regmap_bus
`bma400_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-iio-cont-regmap_bus-v1-2-34754f355b65@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/bma400_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c
index ec13c044b304..765d8c4a4c4d 100644
--- a/drivers/iio/accel/bma400_spi.c
+++ b/drivers/iio/accel/bma400_spi.c
@@ -53,7 +53,7 @@ static int bma400_regmap_spi_write(void *context, const void *data,
return spi_write(spi, data, count);
}
-static struct regmap_bus bma400_regmap_bus = {
+static const struct regmap_bus bma400_regmap_bus = {
.read = bma400_regmap_spi_read,
.write = bma400_regmap_spi_write,
.read_flag_mask = BIT(7),