[PATCH 6/7] mfd: rohm-bd9576: Constify struct regmap_config

Javier Carrasco javier.carrasco.cruz at gmail.com
Wed Jul 3 08:37:39 PDT 2024


`bd957x_regmap` 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 at gmail.com>
---
 drivers/mfd/rohm-bd9576.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/rohm-bd9576.c b/drivers/mfd/rohm-bd9576.c
index 3a9f61961721..634c65c7d108 100644
--- a/drivers/mfd/rohm-bd9576.c
+++ b/drivers/mfd/rohm-bd9576.c
@@ -57,7 +57,7 @@ static const struct regmap_access_table volatile_regs = {
 	.n_yes_ranges = ARRAY_SIZE(volatile_ranges),
 };
 
-static struct regmap_config bd957x_regmap = {
+static const struct regmap_config bd957x_regmap = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.volatile_table = &volatile_regs,

-- 
2.40.1




More information about the linux-arm-kernel mailing list