Skip to contentSkip to conversation

ARM: Make reset_control_ops const

PATCH New Philipp Zabel 2 participants 4 messages Feb 25, 2016 – Feb 29, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: Make reset_control_ops const

Since commit 203d4f347d86 ("reset: Make reset_control_ops const") marked the ops pointer in struct reset_controller_dev as const, these structs can be made const, too. The commit is currently sitting in the arm-soc/for-next branch.

regards
Philipp

Philipp Zabel (2):
ARM: imx: Make reset_control_ops const
ARM: sirf: Make reset_control_ops const

 arch/arm/mach-imx/src.c     | 2 +-
 arch/arm/mach-prima2/rstc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/2 ARM: imx: Make reset_control_ops const

The imx_src_ops structure is never modified. Make it const.

---
 arch/arm/mach-imx/src.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/src.c +1 -1
index 45f7f4e..70b083f 100644
@@ -73,7 +73,7 @@ static int imx_src_reset_module(struct reset_controller_dev *rcdev,
 	return 0;
 }
 
-static struct reset_control_ops imx_src_ops = {
+static const struct reset_control_ops imx_src_ops = {
 	.reset = imx_src_reset_module,
 };
 
Signature · 1 line
2.7.0
#3 lore raw

PATCH 2/2 ARM: sirf: Make reset_control_ops const

In reply to Philipp Zabel

The sirfsoc_rstc_ops structure is never modified. Make it const.

---
 arch/arm/mach-prima2/rstc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-prima2/rstc.c +1 -1
index 7c251eb..1cdb6167 100644
@@ -54,7 +54,7 @@ static int sirfsoc_reset_module(struct reset_controller_dev *rcdev,
 	return 0;
 }
 
-static struct reset_control_ops sirfsoc_rstc_ops = {
+static const struct reset_control_ops sirfsoc_rstc_ops = {
 	.reset = sirfsoc_reset_module,
 };
 
Signature · 1 line
2.7.0