]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
It looks at least odd to apply spin_unlock to a mutex.
authorJulia Lawall <julia@diku.dk>
Sun, 29 Jun 2008 20:50:56 +0000 (22:50 +0200)
committerJesper Nilsson <jesper@jni.nu>
Sun, 29 Jun 2008 20:50:56 +0000 (22:50 +0200)
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@def@
declarer DEFINE_MUTEX;
identifier m;
@@

DEFINE_MUTEX(m);

@@
identifier def.m;
@@

(
- spin_lock(&m)
+ mutex_lock(&m)
|
- spin_unlock(&m)
+ mutex_unlock(&m)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
arch/cris/arch-v10/drivers/pcf8563.c
arch/cris/arch-v32/drivers/pcf8563.c

index 52103d16dc6c0e2b185a8700f8d4263a7683d122..8769dc914073804ce0c75240e0aa6b60fc7c602a 100644 (file)
@@ -233,7 +233,7 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
 
                if (copy_to_user((struct rtc_time *) arg, &tm,
                                 sizeof tm)) {
-                       spin_unlock(&rtc_lock);
+                       mutex_unlock(&rtc_lock);
                        return -EFAULT;
                }
 
index 53db3870ba0413eb510fd63d7152717a92668e72..f263ab571221cb66e5fc200659069ea2291450d7 100644 (file)
@@ -229,7 +229,7 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
 
                if (copy_to_user((struct rtc_time *) arg, &tm,
                                 sizeof tm)) {
-                       spin_unlock(&rtc_lock);
+                       mutex_unlock(&rtc_lock);
                        return -EFAULT;
                }