summaryrefslogtreecommitdiff
path: root/drivers/char/genrtc.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-31 04:14:26 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 04:14:26 (GMT)
commitd5b732b17ca2fc74f370bdba5aae6c804fac8c35 (patch)
tree4facc6d96116b032a3c1cb2ced9b2a3008e9216e /drivers/char/genrtc.c
parenteb6e8605ee5f5b4e116451bf01b3f35eac446dde (diff)
parent67a3e12b05e055c0415c556a315a3d3eb637e29e (diff)
downloadlinux-fsl-qoriq-d5b732b17ca2fc74f370bdba5aae6c804fac8c35.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/genrtc.c')
-rw-r--r--drivers/char/genrtc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
index 31e7c91..b6c2cc1 100644
--- a/drivers/char/genrtc.c
+++ b/drivers/char/genrtc.c
@@ -262,7 +262,7 @@ static inline int gen_set_rtc_irq_bit(unsigned char bit)
#endif
}
-static int gen_rtc_ioctl(struct inode *inode, struct file *file,
+static int gen_rtc_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
struct rtc_time wtime;
@@ -332,6 +332,18 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file,
return -EINVAL;
}
+static long gen_rtc_unlocked_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ int ret;
+
+ lock_kernel();
+ ret = gen_rtc_ioctl(file, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}
+
/*
* We enforce only one user at a time here with the open/close.
* Also clear the previous interrupt data on an open, and clean
@@ -482,7 +494,7 @@ static const struct file_operations gen_rtc_fops = {
.read = gen_rtc_read,
.poll = gen_rtc_poll,
#endif
- .ioctl = gen_rtc_ioctl,
+ .unlocked_ioctl = gen_rtc_unlocked_ioctl,
.open = gen_rtc_open,
.release = gen_rtc_release,
};