projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae036af
)
rtc: at91sam9: Fix missing spin_lock_init()
author
Wei Yongjun
<weiyj.lk@gmail.com>
Mon, 25 Jul 2016 07:05:11 +0000
(07:05 +0000)
committer
Alexandre Belloni
<alexandre.belloni@free-electrons.com>
Mon, 25 Jul 2016 22:09:18 +0000
(
00:09
+0200)
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-at91sam9.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-at91sam9.c
b/drivers/rtc/rtc-at91sam9.c
index 99732e6f8c3b295a9647c5d61caf4779b31d6adf..7418a763ce5202b37f96b0cf26863400aa953982 100644
(file)
--- 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 */