aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-at91sam9.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-07-25 03:05:11 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-07-25 18:09:18 -0400
commitb7b17633d866e79a192b6e616c644bb6f9301a3f (patch)
tree150cec9e35e2b41af0cf2c8404270ab73ee1784e /drivers/rtc/rtc-at91sam9.c
parentae036af8962da5856be2ee2b5543e65014cd608f (diff)
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: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-at91sam9.c')
-rw-r--r--drivers/rtc/rtc-at91sam9.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 99732e6f8c3b..7418a763ce52 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)
375 if (!rtc) 375 if (!rtc)
376 return -ENOMEM; 376 return -ENOMEM;
377 377
378 spin_lock_init(&rtc->lock);
378 rtc->irq = irq; 379 rtc->irq = irq;
379 380
380 /* platform setup code should have handled this; sigh */ 381 /* platform setup code should have handled this; sigh */