aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/ioctl32.c4
-rw-r--r--drivers/sbus/char/rtc.c22
-rw-r--r--include/linux/compat_ioctl.h8
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
40#define DECLARES 40#define DECLARES
41#include "compat_ioctl.c" 41#include "compat_ioctl.c"
42 42
43/* Little p (/dev/rtc, /dev/envctrl, etc.) */
44COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
45COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
46
47IOCTL_TABLE_END 43IOCTL_TABLE_END
48 44
49int ioctl_table_size = ARRAY_SIZE(ioctl_start); 45int 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,
210 } 210 }
211} 211}
212 212
213static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
214 unsigned long arg)
215{
216 int rval = -ENOIOCTLCMD;
217
218 switch (cmd) {
219 /*
220 * These two are specific to this driver, the generic rtc ioctls
221 * are hanlded elsewhere.
222 */
223 case RTCGET:
224 case RTCSET:
225 lock_kernel();
226 rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
227 unlock_kernel();
228 break;
229 }
230
231 return rval;
232}
233
234static int rtc_open(struct inode *inode, struct file *file) 213static int rtc_open(struct inode *inode, struct file *file)
235{ 214{
236 int ret; 215 int ret;
@@ -258,7 +237,6 @@ static struct file_operations rtc_fops = {
258 .owner = THIS_MODULE, 237 .owner = THIS_MODULE,
259 .llseek = no_llseek, 238 .llseek = no_llseek,
260 .ioctl = rtc_ioctl, 239 .ioctl = rtc_ioctl,
261 .compat_ioctl = rtc_compat_ioctl,
262 .open = rtc_open, 240 .open = rtc_open,
263 .release = rtc_release, 241 .release = rtc_release,
264}; 242};
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)
259COMPATIBLE_IOCTL(RTC_SET_TIME) 259COMPATIBLE_IOCTL(RTC_SET_TIME)
260COMPATIBLE_IOCTL(RTC_WKALM_SET) 260COMPATIBLE_IOCTL(RTC_WKALM_SET)
261COMPATIBLE_IOCTL(RTC_WKALM_RD) 261COMPATIBLE_IOCTL(RTC_WKALM_RD)
262/*
263 * These two are only for the sbus rtc driver, but
264 * hwclock tries them on every rtc device first when
265 * running on sparc. On other architectures the entries
266 * are useless but harmless.
267 */
268COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
269COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
262/* Little m */ 270/* Little m */
263COMPATIBLE_IOCTL(MTIOCTOP) 271COMPATIBLE_IOCTL(MTIOCTOP)
264/* Socket level stuff */ 272/* Socket level stuff */