aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat_ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-11-13 19:33:13 -0500
committerArnd Bergmann <arnd@arndb.de>2009-12-10 16:55:36 -0500
commit3695669cd4f5fb6d569fd4243312c1b4a05bd5ce (patch)
tree0e74dafb6f26ac2bbd9d0dcea019798380b55aeb /fs/compat_ioctl.c
parent43c6e7b97f9ea0f4dec430dbafb6afa6ac711eb1 (diff)
lp: move compat_ioctl handling into lp.c
Handling for LPSETTIMEOUT can easily be done in lp_ioctl, which is the only user. As a positive side-effect, push the BKL into the ioctl methods. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r--fs/compat_ioctl.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index ae1f1e699ad7..598763fd207f 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -953,20 +953,6 @@ static int rtc_ioctl(unsigned fd, unsigned cmd, void __user *argp)
953 return -ENOIOCTLCMD; 953 return -ENOIOCTLCMD;
954} 954}
955 955
956static int
957lp_timeout_trans(unsigned int fd, unsigned int cmd,
958 struct compat_timeval __user *tc)
959{
960 struct timeval __user *tn = compat_alloc_user_space(sizeof(struct timeval));
961 struct timeval ts;
962 if (get_user(ts.tv_sec, &tc->tv_sec) ||
963 get_user(ts.tv_usec, &tc->tv_usec) ||
964 put_user(ts.tv_sec, &tn->tv_sec) ||
965 put_user(ts.tv_usec, &tn->tv_usec))
966 return -EFAULT;
967 return sys_ioctl(fd, cmd, (unsigned long)tn);
968}
969
970/* on ia32 l_start is on a 32-bit boundary */ 956/* on ia32 l_start is on a 32-bit boundary */
971#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) 957#if defined(CONFIG_IA64) || defined(CONFIG_X86_64)
972struct space_resv_32 { 958struct space_resv_32 {
@@ -1212,8 +1198,6 @@ COMPATIBLE_IOCTL(PPPIOCGCHAN)
1212/* PPPOX */ 1198/* PPPOX */
1213COMPATIBLE_IOCTL(PPPOEIOCSFWD) 1199COMPATIBLE_IOCTL(PPPOEIOCSFWD)
1214COMPATIBLE_IOCTL(PPPOEIOCDFWD) 1200COMPATIBLE_IOCTL(PPPOEIOCDFWD)
1215/* LP */
1216COMPATIBLE_IOCTL(LPGETSTATUS)
1217/* ppdev */ 1201/* ppdev */
1218COMPATIBLE_IOCTL(PPSETMODE) 1202COMPATIBLE_IOCTL(PPSETMODE)
1219COMPATIBLE_IOCTL(PPRSTATUS) 1203COMPATIBLE_IOCTL(PPRSTATUS)
@@ -1623,19 +1607,6 @@ COMPATIBLE_IOCTL(TIOCSTOP)
1623/* Usbdevfs */ 1607/* Usbdevfs */
1624COMPATIBLE_IOCTL(USBDEVFS_IOCTL32) 1608COMPATIBLE_IOCTL(USBDEVFS_IOCTL32)
1625 1609
1626/* parport */
1627COMPATIBLE_IOCTL(LPTIME)
1628COMPATIBLE_IOCTL(LPCHAR)
1629COMPATIBLE_IOCTL(LPABORTOPEN)
1630COMPATIBLE_IOCTL(LPCAREFUL)
1631COMPATIBLE_IOCTL(LPWAIT)
1632COMPATIBLE_IOCTL(LPSETIRQ)
1633COMPATIBLE_IOCTL(LPGETSTATUS)
1634COMPATIBLE_IOCTL(LPGETSTATUS)
1635COMPATIBLE_IOCTL(LPRESET)
1636/*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/
1637COMPATIBLE_IOCTL(LPGETFLAGS)
1638
1639/* fat 'r' ioctls. These are handled by fat with ->compat_ioctl, 1610/* fat 'r' ioctls. These are handled by fat with ->compat_ioctl,
1640 but we don't want warnings on other file systems. So declare 1611 but we don't want warnings on other file systems. So declare
1641 them as compatible here. */ 1612 them as compatible here. */
@@ -1734,10 +1705,6 @@ static long do_ioctl_trans(int fd, unsigned int cmd,
1734 return do_video_stillpicture(fd, cmd, argp); 1705 return do_video_stillpicture(fd, cmd, argp);
1735 case VIDEO_SET_SPU_PALETTE: 1706 case VIDEO_SET_SPU_PALETTE:
1736 return do_video_set_spu_palette(fd, cmd, argp); 1707 return do_video_set_spu_palette(fd, cmd, argp);
1737
1738 /* lp */
1739 case LPSETTIMEOUT:
1740 return lp_timeout_trans(fd, cmd, argp);
1741 } 1708 }
1742 1709
1743 /* 1710 /*