summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regmap-sdw.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2022-03-30 23:41:10 +0200
committerMark Brown <broonie@kernel.org>2022-04-04 08:41:50 +0100
commitbd941dfaae3503c6b707d8544696205f759e57a3 (patch)
treeaad56e3c71e0f02ce9525c764e3155a33fe2fb9c /drivers/base/regmap/regmap-sdw.c
parent3123109284176b1532874591f7c81f3837bbdc17 (diff)
downloadlwn-bd941dfaae3503c6b707d8544696205f759e57a3.tar.gz
lwn-bd941dfaae3503c6b707d8544696205f759e57a3.zip
regmap: Constify static regmap_bus structs
The only usage of these is to pass their address to __regmap_init() or __devm_regmap_init(), both which takes pointers to const struct regmap_bus. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20220330214110.36337-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regmap-sdw.c')
-rw-r--r--drivers/base/regmap/regmap-sdw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-sdw.c b/drivers/base/regmap/regmap-sdw.c
index 966de8a136d9..81b0327f719d 100644
--- a/drivers/base/regmap/regmap-sdw.c
+++ b/drivers/base/regmap/regmap-sdw.c
@@ -30,7 +30,7 @@ static int regmap_sdw_read(void *context, unsigned int reg, unsigned int *val)
return 0;
}
-static struct regmap_bus regmap_sdw = {
+static const struct regmap_bus regmap_sdw = {
.reg_read = regmap_sdw_read,
.reg_write = regmap_sdw_write,
.reg_format_endian_default = REGMAP_ENDIAN_LITTLE,