Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709330 > unrolled thread

[PATCH 2/2] bus: sunxi-rsb: constify regmap_bus structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2017-08-11 09:30 +0200
Last post2017-08-11 09:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] bus: sunxi-rsb: constify regmap_bus structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-11 09:30 +0200

#1709330 — [PATCH 2/2] bus: sunxi-rsb: constify regmap_bus structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-11 09:30 +0200
Subject[PATCH 2/2] bus: sunxi-rsb: constify regmap_bus structures
Message-ID<udcyl-A7-1@gated-at.bofh.it>
This regmap_bus structure is only passed as the second argument to
__devm_regmap_init, which is const, so the regmap_bus structure can be
const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 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 795c9d9..dc3d781 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -423,7 +423,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,

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web