diff options
-rw-r--r-- | arch/powerpc/kernel/ioctl32.c | 4 | ||||
-rw-r--r-- | drivers/sbus/char/rtc.c | 22 | ||||
-rw-r--r-- | include/linux/compat_ioctl.h | 8 |
3 files changed, 8 insertions, 26 deletions
diff --git a/arch/powerpc/kernel/ioctl32.c b/arch/powerpc/kernel/ioctl32.c index 3fa6a93adbd0..0fa3d27fef01 100644 --- a/arch/powerpc/kernel/ioctl32.c +++ b/arch/powerpc/kernel/ioctl32.c @@ -40,10 +40,6 @@ IOCTL_TABLE_START #define DECLARES #include "compat_ioctl.c" -/* Little p (/dev/rtc, /dev/envctrl, etc.) */ -COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ -COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ - IOCTL_TABLE_END int ioctl_table_size = ARRAY_SIZE(ioctl_start); diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c index 5774bdd0e26f..9b988baf0b51 100644 --- a/drivers/sbus/char/rtc.c +++ b/drivers/sbus/char/rtc.c @@ -210,27 +210,6 @@ 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; @@ -258,7 +237,6 @@ 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, }; diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 2209ad3499a3..174f3379e5d9 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -259,6 +259,14 @@ COMPATIBLE_IOCTL(RTC_RD_TIME) COMPATIBLE_IOCTL(RTC_SET_TIME) COMPATIBLE_IOCTL(RTC_WKALM_SET) COMPATIBLE_IOCTL(RTC_WKALM_RD) +/* + * These two are only for the sbus rtc driver, but + * hwclock tries them on every rtc device first when + * running on sparc. On other architectures the entries + * are useless but harmless. + */ +COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ +COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ /* Little m */ COMPATIBLE_IOCTL(MTIOCTOP) /* Socket level stuff */ |