diff mbox

rtc: imx dryice: Add missing spinlock init

Message ID 20120906140028.6803051b@endymion.delvare
State Superseded
Headers show

Commit Message

Jean Delvare Sept. 6, 2012, noon UTC
It doesn't seem this spinlock was properly initialized. Also add the
missing header include for spinlocks.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
---
I can't even build-test this.

 drivers/rtc/rtc-imxdi.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Sascha Hauer Sept. 6, 2012, 12:21 p.m. UTC | #1
On Thu, Sep 06, 2012 at 02:00:28PM +0200, Jean Delvare wrote:
> It doesn't seem this spinlock was properly initialized. Also add the
> missing header include for spinlocks.
> 
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Alessandro Zummo <a.zummo@towertech.it>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

> ---
> I can't even build-test this.

(I just did)

Sascha

> 
>  drivers/rtc/rtc-imxdi.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- linux-3.6-rc4.orig/drivers/rtc/rtc-imxdi.c	2012-09-06 13:50:04.000000000 +0200
> +++ linux-3.6-rc4/drivers/rtc/rtc-imxdi.c	2012-09-06 13:52:20.064386284 +0200
> @@ -36,6 +36,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/rtc.h>
>  #include <linux/sched.h>
> +#include <linux/spinlock.h>
>  #include <linux/workqueue.h>
>  
>  /* DryIce Register Definitions */
> @@ -396,6 +397,8 @@ static int dryice_rtc_probe(struct platf
>  	if (imxdi->irq < 0)
>  		return imxdi->irq;
>  
> +	spin_lock_init(&imxdi->irq_lock);
> +
>  	init_waitqueue_head(&imxdi->write_wait);
>  
>  	INIT_WORK(&imxdi->work, dryice_work);
> 
> 
> -- 
> Jean Delvare
>
diff mbox

Patch

--- linux-3.6-rc4.orig/drivers/rtc/rtc-imxdi.c	2012-09-06 13:50:04.000000000 +0200
+++ linux-3.6-rc4/drivers/rtc/rtc-imxdi.c	2012-09-06 13:52:20.064386284 +0200
@@ -36,6 +36,7 @@ 
 #include <linux/platform_device.h>
 #include <linux/rtc.h>
 #include <linux/sched.h>
+#include <linux/spinlock.h>
 #include <linux/workqueue.h>
 
 /* DryIce Register Definitions */
@@ -396,6 +397,8 @@  static int dryice_rtc_probe(struct platf
 	if (imxdi->irq < 0)
 		return imxdi->irq;
 
+	spin_lock_init(&imxdi->irq_lock);
+
 	init_waitqueue_head(&imxdi->write_wait);
 
 	INIT_WORK(&imxdi->work, dryice_work);