diff mbox series

[07/10] clk: lpc32xx: Constify struct regmap_config

Message ID 20240703-clk-const-regmap-v1-7-7d15a0671d6f@gmail.com
State Accepted
Commit 7b34303d9dc4f9cf2ea64285bbea26cd01a112c2
Headers show
Series clk: constify struct regmap_config | expand

Commit Message

Javier Carrasco July 3, 2024, 9:50 a.m. UTC
`lpc32xx_scb_regmap_config` 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@gmail.com>
---
 drivers/clk/nxp/clk-lpc32xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Boyd July 8, 2024, 8:32 p.m. UTC | #1
Quoting Javier Carrasco (2024-07-03 02:50:20)
> `lpc32xx_scb_regmap_config` 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@gmail.com>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c
index d0f870eff0d6..e00f270bc6aa 100644
--- a/drivers/clk/nxp/clk-lpc32xx.c
+++ b/drivers/clk/nxp/clk-lpc32xx.c
@@ -61,7 +61,7 @@ 
 #define LPC32XX_USB_CLK_CTRL		0xF4
 #define LPC32XX_USB_CLK_STS		0xF8
 
-static struct regmap_config lpc32xx_scb_regmap_config = {
+static const struct regmap_config lpc32xx_scb_regmap_config = {
 	.name = "scb",
 	.reg_bits = 32,
 	.val_bits = 32,