summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-07-03 23:46:36 +0200
committerJakub Kicinski <kuba@kernel.org>2024-07-05 17:02:20 -0700
commit3b05c7995cae66c263547084ed2f7771f2d3b3a4 (patch)
treec3bee80d065f70dbea4b92a1e71e886a626bb33b
parent9969163c447229af8d144913500ef14e57b68235 (diff)
downloadlwn-3b05c7995cae66c263547084ed2f7771f2d3b3a4.tar.gz
lwn-3b05c7995cae66c263547084ed2f7771f2d3b3a4.zip
net: dsa: ar9331: constify struct regmap_bus
`ar9331_sw_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> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/dsa/qca/ar9331.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
index 968cb81088bf..e9f2c67bc15f 100644
--- a/drivers/net/dsa/qca/ar9331.c
+++ b/drivers/net/dsa/qca/ar9331.c
@@ -1021,7 +1021,7 @@ static const struct regmap_config ar9331_mdio_regmap_config = {
.cache_type = REGCACHE_MAPLE,
};
-static struct regmap_bus ar9331_sw_bus = {
+static const struct regmap_bus ar9331_sw_bus = {
.reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
.val_format_endian_default = REGMAP_ENDIAN_NATIVE,
.read = ar9331_mdio_read,