summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-06-29 22:50:56 +0200
committerJesper Nilsson <jesper@jni.nu>2008-06-29 22:50:56 +0200
commit9be48a94b8ae8c944dc918ad65f2f27e9df3ed00 (patch)
tree3cedc0a34bfc219d66a0ef3cfd395d5c7b06e7a6
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
downloadlinux-stable-9be48a94b8ae8c944dc918ad65f2f27e9df3ed00.tar.gz
linux-stable-9be48a94b8ae8c944dc918ad65f2f27e9df3ed00.tar.bz2
linux-stable-9be48a94b8ae8c944dc918ad65f2f27e9df3ed00.zip
It looks at least odd to apply spin_unlock to a mutex.
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>
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c2
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index 52103d16dc6c..8769dc914073 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -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;
}
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index 53db3870ba04..f263ab571221 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -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;
}