diff options
author | Alan Cox <alan@linux.intel.com> | 2011-02-14 11:27:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 14:59:56 -0500 |
commit | 6caa76b7786891b42b66a0e61e2c2fff2c884620 (patch) | |
tree | eb6e387e080a44680d6d8686999336e69ec97e71 /drivers/tty | |
parent | 00a0d0d65b61241a718d0aee96f46b9a2d93bf26 (diff) |
tty: now phase out the ioctl file pointer for good
Only oddities here are a couple of drivers that bogusly called the ldisc
helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes
away.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/n_gsm.c | 2 | ||||
-rw-r--r-- | drivers/tty/pty.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/68328serial.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/68360serial.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/crisv10.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/serial_core.c | 4 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 4 | ||||
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 6 |
8 files changed, 13 insertions, 13 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 88477d16b8b7..50f3ffd610b7 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -2671,7 +2671,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty, | |||
2671 | } | 2671 | } |
2672 | 2672 | ||
2673 | 2673 | ||
2674 | static int gsmtty_ioctl(struct tty_struct *tty, struct file *filp, | 2674 | static int gsmtty_ioctl(struct tty_struct *tty, |
2675 | unsigned int cmd, unsigned long arg) | 2675 | unsigned int cmd, unsigned long arg) |
2676 | { | 2676 | { |
2677 | return -ENOIOCTLCMD; | 2677 | return -ENOIOCTLCMD; |
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 923a48585501..c88029af84dd 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -334,7 +334,7 @@ free_mem_out: | |||
334 | return -ENOMEM; | 334 | return -ENOMEM; |
335 | } | 335 | } |
336 | 336 | ||
337 | static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, | 337 | static int pty_bsd_ioctl(struct tty_struct *tty, |
338 | unsigned int cmd, unsigned long arg) | 338 | unsigned int cmd, unsigned long arg) |
339 | { | 339 | { |
340 | switch (cmd) { | 340 | switch (cmd) { |
@@ -489,7 +489,7 @@ static struct ctl_table pty_root_table[] = { | |||
489 | }; | 489 | }; |
490 | 490 | ||
491 | 491 | ||
492 | static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, | 492 | static int pty_unix98_ioctl(struct tty_struct *tty, |
493 | unsigned int cmd, unsigned long arg) | 493 | unsigned int cmd, unsigned long arg) |
494 | { | 494 | { |
495 | switch (cmd) { | 495 | switch (cmd) { |
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c index a9d99856c892..1de0e8d4bde1 100644 --- a/drivers/tty/serial/68328serial.c +++ b/drivers/tty/serial/68328serial.c | |||
@@ -945,7 +945,7 @@ static void send_break(struct m68k_serial * info, unsigned int duration) | |||
945 | local_irq_restore(flags); | 945 | local_irq_restore(flags); |
946 | } | 946 | } |
947 | 947 | ||
948 | static int rs_ioctl(struct tty_struct *tty, struct file * file, | 948 | static int rs_ioctl(struct tty_struct *tty, |
949 | unsigned int cmd, unsigned long arg) | 949 | unsigned int cmd, unsigned long arg) |
950 | { | 950 | { |
951 | int error; | 951 | int error; |
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c index 217fe1c299e0..514a356d8d64 100644 --- a/drivers/tty/serial/68360serial.c +++ b/drivers/tty/serial/68360serial.c | |||
@@ -1405,7 +1405,7 @@ static int rs_360_get_icount(struct tty_struct *tty, | |||
1405 | return 0; | 1405 | return 0; |
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | static int rs_360_ioctl(struct tty_struct *tty, struct file * file, | 1408 | static int rs_360_ioctl(struct tty_struct *tty, |
1409 | unsigned int cmd, unsigned long arg) | 1409 | unsigned int cmd, unsigned long arg) |
1410 | { | 1410 | { |
1411 | int error; | 1411 | int error; |
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index b9fcd0bda60c..225123b37f19 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c | |||
@@ -3647,7 +3647,7 @@ rs_tiocmget(struct tty_struct *tty) | |||
3647 | 3647 | ||
3648 | 3648 | ||
3649 | static int | 3649 | static int |
3650 | rs_ioctl(struct tty_struct *tty, struct file * file, | 3650 | rs_ioctl(struct tty_struct *tty, |
3651 | unsigned int cmd, unsigned long arg) | 3651 | unsigned int cmd, unsigned long arg) |
3652 | { | 3652 | { |
3653 | struct e100_serial * info = (struct e100_serial *)tty->driver_data; | 3653 | struct e100_serial * info = (struct e100_serial *)tty->driver_data; |
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 623d6bd911d7..733fe8e73f0f 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -1099,7 +1099,7 @@ static int uart_get_icount(struct tty_struct *tty, | |||
1099 | * Called via sys_ioctl. We can use spin_lock_irq() here. | 1099 | * Called via sys_ioctl. We can use spin_lock_irq() here. |
1100 | */ | 1100 | */ |
1101 | static int | 1101 | static int |
1102 | uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, | 1102 | uart_ioctl(struct tty_struct *tty, unsigned int cmd, |
1103 | unsigned long arg) | 1103 | unsigned long arg) |
1104 | { | 1104 | { |
1105 | struct uart_state *state = tty->driver_data; | 1105 | struct uart_state *state = tty->driver_data; |
@@ -1152,7 +1152,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, | |||
1152 | 1152 | ||
1153 | mutex_lock(&port->mutex); | 1153 | mutex_lock(&port->mutex); |
1154 | 1154 | ||
1155 | if (tty_hung_up_p(filp)) { | 1155 | if (tty->flags & (1 << TTY_IO_ERROR)) { |
1156 | ret = -EIO; | 1156 | ret = -EIO; |
1157 | goto out_up; | 1157 | goto out_up; |
1158 | } | 1158 | } |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 83af24ca1e5e..20a862a2a0c2 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -2676,7 +2676,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
2676 | break; | 2676 | break; |
2677 | } | 2677 | } |
2678 | if (tty->ops->ioctl) { | 2678 | if (tty->ops->ioctl) { |
2679 | retval = (tty->ops->ioctl)(tty, file, cmd, arg); | 2679 | retval = (tty->ops->ioctl)(tty, cmd, arg); |
2680 | if (retval != -ENOIOCTLCMD) | 2680 | if (retval != -ENOIOCTLCMD) |
2681 | return retval; | 2681 | return retval; |
2682 | } | 2682 | } |
@@ -2704,7 +2704,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd, | |||
2704 | return -EINVAL; | 2704 | return -EINVAL; |
2705 | 2705 | ||
2706 | if (tty->ops->compat_ioctl) { | 2706 | if (tty->ops->compat_ioctl) { |
2707 | retval = (tty->ops->compat_ioctl)(tty, file, cmd, arg); | 2707 | retval = (tty->ops->compat_ioctl)(tty, cmd, arg); |
2708 | if (retval != -ENOIOCTLCMD) | 2708 | if (retval != -ENOIOCTLCMD) |
2709 | return retval; | 2709 | return retval; |
2710 | } | 2710 | } |
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 9e9a901442a3..b64804965316 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -495,7 +495,7 @@ do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_ | |||
495 | * We handle the console-specific ioctl's here. We allow the | 495 | * We handle the console-specific ioctl's here. We allow the |
496 | * capability to modify any console, not just the fg_console. | 496 | * capability to modify any console, not just the fg_console. |
497 | */ | 497 | */ |
498 | int vt_ioctl(struct tty_struct *tty, struct file * file, | 498 | int vt_ioctl(struct tty_struct *tty, |
499 | unsigned int cmd, unsigned long arg) | 499 | unsigned int cmd, unsigned long arg) |
500 | { | 500 | { |
501 | struct vc_data *vc = tty->driver_data; | 501 | struct vc_data *vc = tty->driver_data; |
@@ -1495,7 +1495,7 @@ compat_unimap_ioctl(unsigned int cmd, struct compat_unimapdesc __user *user_ud, | |||
1495 | return 0; | 1495 | return 0; |
1496 | } | 1496 | } |
1497 | 1497 | ||
1498 | long vt_compat_ioctl(struct tty_struct *tty, struct file * file, | 1498 | long vt_compat_ioctl(struct tty_struct *tty, |
1499 | unsigned int cmd, unsigned long arg) | 1499 | unsigned int cmd, unsigned long arg) |
1500 | { | 1500 | { |
1501 | struct vc_data *vc = tty->driver_data; | 1501 | struct vc_data *vc = tty->driver_data; |
@@ -1581,7 +1581,7 @@ out: | |||
1581 | 1581 | ||
1582 | fallback: | 1582 | fallback: |
1583 | tty_unlock(); | 1583 | tty_unlock(); |
1584 | return vt_ioctl(tty, file, cmd, arg); | 1584 | return vt_ioctl(tty, cmd, arg); |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | 1587 | ||