summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-07-03 23:46:35 +0200
committerJakub Kicinski <kuba@kernel.org>2024-07-05 17:02:20 -0700
commit9969163c447229af8d144913500ef14e57b68235 (patch)
tree76387b0bb9a7a3d94fa941e97c858583e4bec740
parent7f805f6396d496e9b7b7e92389c987178afeef7b (diff)
downloadlwn-9969163c447229af8d144913500ef14e57b68235.tar.gz
lwn-9969163c447229af8d144913500ef14e57b68235.zip
net: encx24j600: constify struct regmap_bus/regmap_config
`regmap_encx24j600`, `phycfg` and `phymap_encx24j600` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240703-net-const-regmap-v1-3-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/microchip/encx24j600-regmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/microchip/encx24j600-regmap.c b/drivers/net/ethernet/microchip/encx24j600-regmap.c
index 3885d6fbace1..26b00e66d912 100644
--- a/drivers/net/ethernet/microchip/encx24j600-regmap.c
+++ b/drivers/net/ethernet/microchip/encx24j600-regmap.c
@@ -474,13 +474,13 @@ static struct regmap_config regcfg = {
.unlock = regmap_unlock_mutex,
};
-static struct regmap_bus regmap_encx24j600 = {
+static const struct regmap_bus regmap_encx24j600 = {
.write = regmap_encx24j600_write,
.read = regmap_encx24j600_read,
.reg_update_bits = regmap_encx24j600_reg_update_bits,
};
-static struct regmap_config phycfg = {
+static const struct regmap_config phycfg = {
.name = "phy",
.reg_bits = 8,
.val_bits = 16,
@@ -492,7 +492,7 @@ static struct regmap_config phycfg = {
.volatile_reg = encx24j600_phymap_volatile,
};
-static struct regmap_bus phymap_encx24j600 = {
+static const struct regmap_bus phymap_encx24j600 = {
.reg_write = regmap_encx24j600_phy_reg_write,
.reg_read = regmap_encx24j600_phy_reg_read,
};