All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops
@ 2016-12-26 11:31 ` Bhumika Goyal
  0 siblings, 0 replies; 39+ messages in thread
From: Bhumika Goyal @ 2016-12-26 11:31 UTC (permalink / raw)
  To: julia.lawall, jason, andrew, gregory.clement,
	sebastian.hesselbarth, a.zummo, alexandre.belloni,
	linux-arm-kernel, rtc-linux, linux-kernel
  Cc: keescook, Bhumika Goyal

The object armada38x_rtc_ops of type rtc_class_ops structure is not
modified after getting initialized by armada38x_rtc_probe. Apart from
getting referenced in init it is also passed as an argument to the function
devm_rtc_device_register but this argument is of type const struct
rtc_class_ops *. Therefore add __ro_after_init to its declaration.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/rtc/rtc-armada38x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
index 9a3f2a6..7883c7f 100644
--- a/drivers/rtc/rtc-armada38x.c
+++ b/drivers/rtc/rtc-armada38x.c
@@ -202,7 +202,7 @@ static irqreturn_t armada38x_rtc_alarm_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static struct rtc_class_ops armada38x_rtc_ops = {
+static struct rtc_class_ops armada38x_rtc_ops __ro_after_init = {
 	.read_time = armada38x_rtc_read_time,
 	.set_time = armada38x_rtc_set_time,
 	.read_alarm = armada38x_rtc_read_alarm,
-- 
1.9.1

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

end of thread, other threads:[~2017-01-04 21:54 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26 11:31 [PATCH] rtc: armada38x: add __ro_after_init to armada38x_rtc_ops Bhumika Goyal
2016-12-26 11:31 ` Bhumika Goyal
2016-12-26 11:31 ` [rtc-linux] " Bhumika Goyal
2017-01-02 14:06 ` Russell King - ARM Linux
2017-01-02 14:06   ` Russell King - ARM Linux
2017-01-02 14:06   ` [rtc-linux] " Russell King - ARM Linux
2017-01-03 21:18   ` Kees Cook
2017-01-03 21:18     ` Kees Cook
2017-01-03 21:18     ` [rtc-linux] " Kees Cook
2017-01-03 21:31     ` Russell King - ARM Linux
2017-01-03 21:31       ` Russell King - ARM Linux
2017-01-03 21:31       ` [rtc-linux] " Russell King - ARM Linux
2017-01-03 21:54       ` Russell King - ARM Linux
2017-01-03 21:54         ` Russell King - ARM Linux
2017-01-03 21:54         ` [rtc-linux] " Russell King - ARM Linux
2017-01-04 10:57         ` Julia Lawall
2017-01-04 10:57           ` Julia Lawall
2017-01-04 10:57           ` [rtc-linux] " Julia Lawall
2017-01-04 11:07           ` Alexandre Belloni
2017-01-04 11:07             ` Alexandre Belloni
2017-01-04 11:07             ` [rtc-linux] " Alexandre Belloni
2017-01-04 11:43             ` Julia Lawall
2017-01-04 11:43               ` Julia Lawall
2017-01-04 11:43               ` [rtc-linux] " Julia Lawall
2017-01-04 12:14               ` Russell King - ARM Linux
2017-01-04 12:14                 ` Russell King - ARM Linux
2017-01-04 12:14                 ` [rtc-linux] " Russell King - ARM Linux
2017-01-04 12:23                 ` Julia Lawall
2017-01-04 12:23                   ` Julia Lawall
2017-01-04 12:23                   ` [rtc-linux] " Julia Lawall
2017-01-04 13:06                   ` Russell King - ARM Linux
2017-01-04 13:06                     ` Russell King - ARM Linux
2017-01-04 13:06                     ` [rtc-linux] " Russell King - ARM Linux
2017-01-04 13:41                     ` Julia Lawall
2017-01-04 13:41                       ` Julia Lawall
2017-01-04 13:41                       ` [rtc-linux] " Julia Lawall
2017-01-04 21:53                     ` Kees Cook
2017-01-04 21:53                       ` Kees Cook
2017-01-04 21:53                       ` [rtc-linux] " Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.