[PATCH] bus: sunxi-rsb: Constify struct regmap_bus

Javier Carrasco posted 1 patch 1 year, 7 months ago
drivers/bus/sunxi-rsb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] bus: sunxi-rsb: Constify struct regmap_bus
Posted by Javier Carrasco 1 year, 7 months ago
`regmap_sunxi_rsb` 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/bus/sunxi-rsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index 1e29ba76615d..ac6c7e4900f4 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -457,7 +457,7 @@ static void regmap_sunxi_rsb_free_ctx(void *context)
 	kfree(ctx);
 }
 
-static struct regmap_bus regmap_sunxi_rsb = {
+static const struct regmap_bus regmap_sunxi_rsb = {
 	.reg_write = regmap_sunxi_rsb_reg_write,
 	.reg_read = regmap_sunxi_rsb_reg_read,
 	.free_context = regmap_sunxi_rsb_free_ctx,

---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240705-sunxi-rsb-bus-const-regmap_bus-3cee4a3e313b

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Re: [PATCH] bus: sunxi-rsb: Constify struct regmap_bus
Posted by Chen-Yu Tsai 1 year, 7 months ago
On Fri, 05 Jul 2024 08:05:18 +0200, Javier Carrasco wrote:
> `regmap_sunxi_rsb` is not modified and can be declared as const to
> move its data to a read-only section.
> 
> 

Applied to sunxi/drivers-for-6.11 in sunxi/linux.git, thanks!

[1/1] bus: sunxi-rsb: Constify struct regmap_bus
      https://git.kernel.org/sunxi/linux/c/e4b5a39c2fca

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>