Skip to content

Commit 3b05c79

Browse files
javiercarrascocruzkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9969163 commit 3b05c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/qca/ar9331.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ static const struct regmap_config ar9331_mdio_regmap_config = {
10211021
.cache_type = REGCACHE_MAPLE,
10221022
};
10231023

1024-
static struct regmap_bus ar9331_sw_bus = {
1024+
static const struct regmap_bus ar9331_sw_bus = {
10251025
.reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
10261026
.val_format_endian_default = REGMAP_ENDIAN_NATIVE,
10271027
.read = ar9331_mdio_read,

0 commit comments

Comments
 (0)