regmap: constify regmap_bus structures
These regmap_bus structures are only passed as the second argument to __devm_regmap_init or __regmap_init, both of which are const, so the regmap_bus structures can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -83,7 +83,7 @@ static int regmap_spmi_base_write(void *context, const void *data,
|
||||
count - 1);
|
||||
}
|
||||
|
||||
static struct regmap_bus regmap_spmi_base = {
|
||||
static const struct regmap_bus regmap_spmi_base = {
|
||||
.read = regmap_spmi_base_read,
|
||||
.write = regmap_spmi_base_write,
|
||||
.gather_write = regmap_spmi_base_gather_write,
|
||||
@@ -203,7 +203,7 @@ static int regmap_spmi_ext_write(void *context, const void *data,
|
||||
count - 2);
|
||||
}
|
||||
|
||||
static struct regmap_bus regmap_spmi_ext = {
|
||||
static const struct regmap_bus regmap_spmi_ext = {
|
||||
.read = regmap_spmi_ext_read,
|
||||
.write = regmap_spmi_ext_write,
|
||||
.gather_write = regmap_spmi_ext_gather_write,
|
||||
|
Reference in New Issue
Block a user