Skip to content

Commit 9969163

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/microchip/encx24j600-regmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,13 @@ static struct regmap_config regcfg = {
474474
.unlock = regmap_unlock_mutex,
475475
};
476476

477-
static struct regmap_bus regmap_encx24j600 = {
477+
static const struct regmap_bus regmap_encx24j600 = {
478478
.write = regmap_encx24j600_write,
479479
.read = regmap_encx24j600_read,
480480
.reg_update_bits = regmap_encx24j600_reg_update_bits,
481481
};
482482

483-
static struct regmap_config phycfg = {
483+
static const struct regmap_config phycfg = {
484484
.name = "phy",
485485
.reg_bits = 8,
486486
.val_bits = 16,
@@ -492,7 +492,7 @@ static struct regmap_config phycfg = {
492492
.volatile_reg = encx24j600_phymap_volatile,
493493
};
494494

495-
static struct regmap_bus phymap_encx24j600 = {
495+
static const struct regmap_bus phymap_encx24j600 = {
496496
.reg_write = regmap_encx24j600_phy_reg_write,
497497
.reg_read = regmap_encx24j600_phy_reg_read,
498498
};

0 commit comments

Comments
 (0)