aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-02-14 11:26:50 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 14:52:43 -0500
commit20b9d17715017ae4dd4ec87fabc36d33b9de708e (patch)
tree64e9c4ff845844298f9056357d9f4914802207f8 /drivers/tty
parent60b33c133ca0b7c0b6072c87234b63fee6e80558 (diff)
tiocmset: kill the file pointer argument
Doing tiocmget was such fun we should do tiocmset as well for the same reasons 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/hvc/hvsi.c4
-rw-r--r--drivers/tty/n_gsm.c2
-rw-r--r--drivers/tty/serial/68360serial.c2
-rw-r--r--drivers/tty/serial/crisv10.c3
-rw-r--r--drivers/tty/serial/ifx6x60.c3
-rw-r--r--drivers/tty/serial/serial_core.c6
-rw-r--r--drivers/tty/tty_io.c7
7 files changed, 11 insertions, 16 deletions
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index 55293105a56c..8a8d6373f164 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -1103,8 +1103,8 @@ static int hvsi_tiocmget(struct tty_struct *tty)
1103 return hp->mctrl; 1103 return hp->mctrl;
1104} 1104}
1105 1105
1106static int hvsi_tiocmset(struct tty_struct *tty, struct file *file, 1106static int hvsi_tiocmset(struct tty_struct *tty,
1107 unsigned int set, unsigned int clear) 1107 unsigned int set, unsigned int clear)
1108{ 1108{
1109 struct hvsi_struct *hp = tty->driver_data; 1109 struct hvsi_struct *hp = tty->driver_data;
1110 unsigned long flags; 1110 unsigned long flags;
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 97e3d509ff82..88477d16b8b7 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2654,7 +2654,7 @@ static int gsmtty_tiocmget(struct tty_struct *tty)
2654 return dlci->modem_rx; 2654 return dlci->modem_rx;
2655} 2655}
2656 2656
2657static int gsmtty_tiocmset(struct tty_struct *tty, struct file *filp, 2657static int gsmtty_tiocmset(struct tty_struct *tty,
2658 unsigned int set, unsigned int clear) 2658 unsigned int set, unsigned int clear)
2659{ 2659{
2660 struct gsm_dlci *dlci = tty->driver_data; 2660 struct gsm_dlci *dlci = tty->driver_data;
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c
index 2a52cf14ce50..217fe1c299e0 100644
--- a/drivers/tty/serial/68360serial.c
+++ b/drivers/tty/serial/68360serial.c
@@ -1271,7 +1271,7 @@ static int rs_360_tiocmget(struct tty_struct *tty)
1271 return result; 1271 return result;
1272} 1272}
1273 1273
1274static int rs_360_tiocmset(struct tty_struct *tty, struct file *file, 1274static int rs_360_tiocmset(struct tty_struct *tty,
1275 unsigned int set, unsigned int clear) 1275 unsigned int set, unsigned int clear)
1276{ 1276{
1277#ifdef modem_control 1277#ifdef modem_control
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 8cc5c0224b25..b9fcd0bda60c 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -3581,8 +3581,7 @@ rs_break(struct tty_struct *tty, int break_state)
3581} 3581}
3582 3582
3583static int 3583static int
3584rs_tiocmset(struct tty_struct *tty, struct file *file, 3584rs_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear)
3585 unsigned int set, unsigned int clear)
3586{ 3585{
3587 struct e100_serial *info = (struct e100_serial *)tty->driver_data; 3586 struct e100_serial *info = (struct e100_serial *)tty->driver_data;
3588 unsigned long flags; 3587 unsigned long flags;
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 4d26d39ec344..8ee5a41d340d 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -263,7 +263,6 @@ static int ifx_spi_tiocmget(struct tty_struct *tty)
263/** 263/**
264 * ifx_spi_tiocmset - set modem bits 264 * ifx_spi_tiocmset - set modem bits
265 * @tty: the tty structure 265 * @tty: the tty structure
266 * @filp: file handle issuing the request
267 * @set: bits to set 266 * @set: bits to set
268 * @clear: bits to clear 267 * @clear: bits to clear
269 * 268 *
@@ -272,7 +271,7 @@ static int ifx_spi_tiocmget(struct tty_struct *tty)
272 * 271 *
273 * FIXME: do we need to kick the tranfers when we do this ? 272 * FIXME: do we need to kick the tranfers when we do this ?
274 */ 273 */
275static int ifx_spi_tiocmset(struct tty_struct *tty, struct file *filp, 274static int ifx_spi_tiocmset(struct tty_struct *tty,
276 unsigned int set, unsigned int clear) 275 unsigned int set, unsigned int clear)
277{ 276{
278 struct ifx_spi_device *ifx_dev = tty->driver_data; 277 struct ifx_spi_device *ifx_dev = tty->driver_data;
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 53e490e47560..623d6bd911d7 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -925,8 +925,7 @@ static int uart_tiocmget(struct tty_struct *tty)
925} 925}
926 926
927static int 927static int
928uart_tiocmset(struct tty_struct *tty, struct file *file, 928uart_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear)
929 unsigned int set, unsigned int clear)
930{ 929{
931 struct uart_state *state = tty->driver_data; 930 struct uart_state *state = tty->driver_data;
932 struct uart_port *uport = state->uart_port; 931 struct uart_port *uport = state->uart_port;
@@ -934,8 +933,7 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
934 int ret = -EIO; 933 int ret = -EIO;
935 934
936 mutex_lock(&port->mutex); 935 mutex_lock(&port->mutex);
937 if ((!file || !tty_hung_up_p(file)) && 936 if (!(tty->flags & (1 << TTY_IO_ERROR))) {
938 !(tty->flags & (1 << TTY_IO_ERROR))) {
939 uart_update_mctrl(uport, set, clear); 937 uart_update_mctrl(uport, set, clear);
940 ret = 0; 938 ret = 0;
941 } 939 }
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index fde5a4dae3dd..83af24ca1e5e 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2481,7 +2481,6 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
2481/** 2481/**
2482 * tty_tiocmset - set modem status 2482 * tty_tiocmset - set modem status
2483 * @tty: tty device 2483 * @tty: tty device
2484 * @file: user file pointer
2485 * @cmd: command - clear bits, set bits or set all 2484 * @cmd: command - clear bits, set bits or set all
2486 * @p: pointer to desired bits 2485 * @p: pointer to desired bits
2487 * 2486 *
@@ -2491,7 +2490,7 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
2491 * Locking: none (up to the driver) 2490 * Locking: none (up to the driver)
2492 */ 2491 */
2493 2492
2494static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, 2493static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
2495 unsigned __user *p) 2494 unsigned __user *p)
2496{ 2495{
2497 int retval; 2496 int retval;
@@ -2518,7 +2517,7 @@ static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int
2518 } 2517 }
2519 set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; 2518 set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP;
2520 clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; 2519 clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP;
2521 return tty->ops->tiocmset(tty, file, set, clear); 2520 return tty->ops->tiocmset(tty, set, clear);
2522} 2521}
2523 2522
2524static int tty_tiocgicount(struct tty_struct *tty, void __user *arg) 2523static int tty_tiocgicount(struct tty_struct *tty, void __user *arg)
@@ -2659,7 +2658,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2659 case TIOCMSET: 2658 case TIOCMSET:
2660 case TIOCMBIC: 2659 case TIOCMBIC:
2661 case TIOCMBIS: 2660 case TIOCMBIS:
2662 return tty_tiocmset(tty, file, cmd, p); 2661 return tty_tiocmset(tty, cmd, p);
2663 case TIOCGICOUNT: 2662 case TIOCGICOUNT:
2664 retval = tty_tiocgicount(tty, p); 2663 retval = tty_tiocgicount(tty, p);
2665 /* For the moment allow fall through to the old method */ 2664 /* For the moment allow fall through to the old method */