diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-10 11:06:04 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-10 11:06:04 +1100 |
commit | 31e7f1ff3c5d39a70da85f7d81a1ab1f4e64fa97 (patch) | |
tree | a6cb8f14b1182e5dce55d13e52c1182a8c7e0402 /drivers/sbus/char/rtc.c | |
parent | fca5dcd4835ed09bb1a48a355344aff7a25c76e0 (diff) | |
parent | 6730c3c14421b7c924d06e31bb66e0adad225547 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/sbus/char/rtc.c')
-rw-r--r-- | drivers/sbus/char/rtc.c | 22 |
1 files changed, 22 insertions, 0 deletions
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, }; |