]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: mt7530: Constify struct regmap_config
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 13 Jul 2025 15:09:24 +0000 (17:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Jul 2025 21:28:56 +0000 (22:28 +0100)
commit9eb73f92a0b003f2fb9091085c51a4a4554c887d
tree543275d9aa0d92ea4c0908fb81c7899614e18ee2
parent8c2e602225f0a96f2c5c65de8ab06e304081e542
net: dsa: mt7530: Constify struct regmap_config

'struct regmap_config' are not modified in these drivers. They be
statically defined instead of allocated and populated at run-time.

The main benefits are:
  - it saves some memory at runtime
  - the structures can be declared as 'const', which is always better for
    structures that hold some function pointers
  - the code is less verbose

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530-mdio.c
drivers/net/dsa/mt7530-mmio.c