Skip to content

Commit 371e8c2

Browse files
Brian GerstLinus Torvalds
authored andcommitted
[PATCH] Remove orphaned TIOCGDEV compat ioctl
This ioctl doesn't exist for native i386. Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 381be25 commit 371e8c2

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

‎arch/x86_64/ia32/ia32_ioctl.c‎

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,6 @@
1717
#define CODE
1818
#include "compat_ioctl.c"
1919

20-
#ifndef TIOCGDEV
21-
#define TIOCGDEV _IOR('T',0x32, unsigned int)
22-
#endif
23-
static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr)
24-
{
25-
26-
struct file *file;
27-
struct tty_struct *real_tty;
28-
int fput_needed, ret;
29-
30-
file = fget_light(fd, &fput_needed);
31-
if (!file)
32-
return -EBADF;
33-
34-
ret = -EINVAL;
35-
if (file->f_op->ioctl != tty_ioctl)
36-
goto out;
37-
real_tty = (struct tty_struct *)file->private_data;
38-
if (!real_tty)
39-
goto out;
40-
41-
ret = put_user(new_encode_dev(tty_devnum(real_tty)), ptr);
42-
43-
out:
44-
fput_light(file, fput_needed);
45-
return ret;
46-
}
47-
4820
#define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int) /* Read IRQ rate */
4921
#define RTC_IRQP_SET32 _IOW('p', 0x0c, unsigned int) /* Set IRQ rate */
5022
#define RTC_EPOCH_READ32 _IOR('p', 0x0d, unsigned) /* Read epoch */
@@ -100,7 +72,6 @@ COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain *
10072
COMPATIBLE_IOCTL(FIOQSIZE)
10173

10274
/* And these ioctls need translation */
103-
HANDLE_IOCTL(TIOCGDEV, tiocgdev)
10475
/* realtime device */
10576
HANDLE_IOCTL(RTC_IRQP_READ, rtc32_ioctl)
10677
HANDLE_IOCTL(RTC_IRQP_READ32,rtc32_ioctl)

0 commit comments

Comments
 (0)