mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARM: prima2: Constify static sirfsoc_rstc_ops
@ 2020-09-29 20:17 Rikard Falkeborn
  2020-09-30 12:55 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Rikard Falkeborn @ 2020-09-29 20:17 UTC (permalink / raw)
  To: Barry Song
  Cc: Russell King, Philipp Zabel, linux-arm-kernel, linux-kernel,
	Rikard Falkeborn

The only usage of sirfsoc_rstc_ops is to assign its address to the ops
field in the reset_controller_dev struct, which is a const pointer. Make
it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 arch/arm/mach-prima2/rstc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index 9d56606ac87f..1ee405e2dde9 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -53,7 +53,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,
 };
 
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-30 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 20:17 [PATCH] ARM: prima2: Constify static sirfsoc_rstc_ops Rikard Falkeborn
2020-09-30 12:55 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®