提交 b7b17633 编写于 作者: W Wei Yongjun 提交者: Alexandre Belloni

rtc: at91sam9: Fix missing spin_lock_init()

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: NWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 ae036af8
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册