summaryrefslogtreecommitdiff
path: root/fs/compat_ioctl.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-02-26 04:18:55 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-26 09:53:31 -0800
commitfc5870f66279fabedc9dbba7c28451bbb8f47778 (patch)
treef0beaef2e55404663ef0872c923813df9a0fa7b5 /fs/compat_ioctl.c
parentab9b32ee626e9b6df4ce2560a70ae15e62423cf4 (diff)
[PATCH] x86_64: Fix ioctl compat code for /dev/rtc
RTC_IRQP_SET/RTC_EPOCH_SET don't take a pointer to an argument, but the argument itself. This actually simplifies the code and makes it work. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r--fs/compat_ioctl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 057e60217fc5..537ac70edfe5 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -2531,18 +2531,9 @@ static int rtc_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
val32 = kval;
return put_user(val32, (unsigned int __user *)arg);
case RTC_IRQP_SET32:
+ return sys_ioctl(fd, RTC_IRQP_SET, arg);
case RTC_EPOCH_SET32:
- ret = get_user(val32, (unsigned int __user *)arg);
- if (ret)
- return ret;
- kval = val32;
-
- set_fs(KERNEL_DS);
- ret = sys_ioctl(fd, (cmd == RTC_IRQP_SET32) ?
- RTC_IRQP_SET : RTC_EPOCH_SET,
- (unsigned long)&kval);
- set_fs(oldfs);
- return ret;
+ return sys_ioctl(fd, RTC_EPOCH_SET, arg);
default:
/* unreached */
return -ENOIOCTLCMD;