* [rtc-linux] [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init()
@ 2016-07-25 7:05 Wei Yongjun
2016-07-26 7:42 ` [rtc-linux] " Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-07-25 7:05 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni; +Cc: Wei Yongjun, rtc-linux, linux-kernel
The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
drivers/rtc/rtc-at91sam9.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 99732e6..7418a76 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -375,6 +375,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
if (!rtc)
return -ENOMEM;
+ spin_lock_init(&rtc->lock);
rtc->irq = irq;
/* platform setup code should have handled this; sigh */
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [rtc-linux] Re: [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init()
2016-07-25 7:05 [rtc-linux] [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init() Wei Yongjun
@ 2016-07-26 7:42 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-07-26 7:42 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Alessandro Zummo, rtc-linux, linux-kernel
On 25/07/2016 at 07:05:11 +0000, Wei Yongjun wrote :
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> This is detected by Coccinelle semantic patch.
>
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
> ---
> drivers/rtc/rtc-at91sam9.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-26 7:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 7:05 [rtc-linux] [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init() Wei Yongjun
2016-07-26 7:42 ` [rtc-linux] " Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox