aboutsummaryrefslogtreecommitdiff
path: root/drivers/sbus
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-11 23:39:35 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-11 23:39:35 -0500
commitf4256e301d9800b1e0276404cb01b3ac85b51067 (patch)
tree975f56627b78f757608b31684311a24ca1478481 /drivers/sbus
parentfb2a26b9f8f5eda6b96ba9753edf105e5999d6d9 (diff)
parentcd52d1ee9a92587b242d946a2300a3245d3b885a (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/cpwatchdog.c2
-rw-r--r--drivers/sbus/char/display7seg.c4
-rw-r--r--drivers/sbus/char/rtc.c22
3 files changed, 25 insertions, 3 deletions
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c
index 071ae24be89..fd2cc7782f7 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.c
@@ -407,7 +407,7 @@ static long wd_compat_ioctl(struct file *file, unsigned int cmd,
case WIOCGSTAT:
lock_kernel();
rval = wd_ioctl(file->f_dentry->d_inode, file, cmd, arg);
- lock_kernel();
+ unlock_kernel();
break;
/* everything else is handled by the generic compat layer */
default:
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 39f54213a6d..c3a51d1fae5 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -119,7 +119,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
__u8 regs = readb(d7s_regs);
__u8 ireg = 0;
- int error = 0
+ int error = 0;
if (D7S_MINOR != iminor(file->f_dentry->d_inode))
return -ENODEV;
@@ -161,7 +161,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
writeb(regs, d7s_regs);
break;
};
- lock_kernel();
+ unlock_kernel();
return error;
}
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c
index 9b988baf0b5..5774bdd0e26 100644
--- a/drivers/sbus/char/rtc.c
+++ b/drivers/sbus/char/rtc.c
@@ -210,6 +210,27 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}
+static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ int rval = -ENOIOCTLCMD;
+
+ switch (cmd) {
+ /*
+ * These two are specific to this driver, the generic rtc ioctls
+ * are hanlded elsewhere.
+ */
+ case RTCGET:
+ case RTCSET:
+ lock_kernel();
+ rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
+ unlock_kernel();
+ break;
+ }
+
+ return rval;
+}
+
static int rtc_open(struct inode *inode, struct file *file)
{
int ret;
@@ -237,6 +258,7 @@ static struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = rtc_ioctl,
+ .compat_ioctl = rtc_compat_ioctl,
.open = rtc_open,
.release = rtc_release,
};