diff options
author | Christoph Hellwig <hch@lst.de> | 2005-11-09 21:07:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-09 21:07:18 +0100 |
commit | 8ca2bdc7a98b9584ac5f640761501405154171c7 (patch) | |
tree | 9d9a601fa9c189e5726d09a778e0ac29330a36dd /drivers/sbus/char/rtc.c | |
parent | [SPARC]: Fix locking thinkos in display7seg and cpwatchdog drivers. (diff) | |
download | linux-8ca2bdc7a98b9584ac5f640761501405154171c7.tar.xz linux-8ca2bdc7a98b9584ac5f640761501405154171c7.zip |
[SPARC] sbus rtc: implement ->compat_ioctl
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 9b988baf0b51..5774bdd0e26f 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, }; |