Skip to content

Commit

Permalink
tiocmset: kill the file pointer argument
Browse files Browse the repository at this point in the history
Doing tiocmget was such fun we should do tiocmset as well for the same
reasons

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Alan Cox authored and gregkh committed Feb 17, 2011
1 parent 60b33c1 commit 20b9d17
Show file tree
Hide file tree
Showing 70 changed files with 120 additions and 129 deletions.
4 changes: 2 additions & 2 deletions drivers/char/amiserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ static int rs_tiocmget(struct tty_struct *tty)
| (!(status & SER_CTS) ? TIOCM_CTS : 0);
}

static int rs_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int rs_tiocmset(struct tty_struct *tty, unsigned int set,
unsigned int clear)
{
struct async_struct * info = tty->driver_data;
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ static int cy_tiocmget(struct tty_struct *tty)
} /* cy_tiomget */

static int
cy_tiocmset(struct tty_struct *tty, struct file *file,
cy_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct cyclades_port *info = tty->driver_data;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/epca.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ static int pc_tiocmget(struct tty_struct *tty)
return mflag;
}

static int pc_tiocmset(struct tty_struct *tty, struct file *file,
static int pc_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct channel *ch = tty->driver_data;
Expand Down Expand Up @@ -2081,7 +2081,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,
case TIOCMODS:
if (get_user(mstat, (unsigned __user *)argp))
return -EFAULT;
return pc_tiocmset(tty, file, mstat, ~mstat);
return pc_tiocmset(tty, mstat, ~mstat);
case TIOCSDTR:
spin_lock_irqsave(&epca_lock, flags);
ch->omodem |= ch->m_dtr;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ip2/ip2main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static void ip2_stop(PTTY);
static void ip2_start(PTTY);
static void ip2_hangup(PTTY);
static int ip2_tiocmget(struct tty_struct *tty);
static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
static int ip2_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int ip2_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount);
Expand Down Expand Up @@ -2085,7 +2085,7 @@ static int ip2_tiocmget(struct tty_struct *tty)
| ((pCh->dataSetIn & I2_CTS) ? TIOCM_CTS : 0);
}

static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
static int ip2_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
i2ChanStrPtr pCh = DevTable[tty->index];
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/isicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,8 @@ static int isicom_tiocmget(struct tty_struct *tty)
((status & ISI_RI ) ? TIOCM_RI : 0);
}

static int isicom_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int isicom_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct isi_port *port = tty->driver_data;
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ static int stli_tiocmget(struct tty_struct *tty)
return stli_mktiocm(portp->asig.sigvalue);
}

static int stli_tiocmset(struct tty_struct *tty, struct file *file,
static int stli_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct stliport *portp = tty->driver_data;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static void moxa_stop(struct tty_struct *);
static void moxa_start(struct tty_struct *);
static void moxa_hangup(struct tty_struct *);
static int moxa_tiocmget(struct tty_struct *tty);
static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
static int moxa_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static void moxa_poll(unsigned long);
static void moxa_set_tty_param(struct tty_struct *, struct ktermios *);
Expand Down Expand Up @@ -1277,7 +1277,7 @@ static int moxa_tiocmget(struct tty_struct *tty)
return flag;
}

static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
static int moxa_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct moxa_port *ch;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ static int mxser_tiocmget(struct tty_struct *tty)
((status & UART_MSR_CTS) ? TIOCM_CTS : 0);
}

static int mxser_tiocmset(struct tty_struct *tty, struct file *file,
static int mxser_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct mxser_port *info = tty->driver_data;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,8 +1767,8 @@ static int ntty_tiocmget(struct tty_struct *tty)
}

/* Sets io controls parameters */
static int ntty_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int ntty_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct nozomi *dc = get_dc_by_tty(tty);
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/pcmcia/ipwireless/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty)
}

static int
ipw_tiocmset(struct tty_struct *linux_tty, struct file *file,
ipw_tiocmset(struct tty_struct *linux_tty,
unsigned int set, unsigned int clear)
{
struct ipw_tty *tty = linux_tty->driver_data;
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/pcmcia/synclink_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ static void bh_status(MGSLPC_INFO *info);
* ioctl handlers
*/
static int tiocmget(struct tty_struct *tty);
static int tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int get_stats(MGSLPC_INFO *info, struct mgsl_icount __user *user_icount);
static int get_params(MGSLPC_INFO *info, MGSL_PARAMS __user *user_params);
static int set_params(MGSLPC_INFO *info, MGSL_PARAMS __user *new_params, struct tty_struct *tty);
Expand Down Expand Up @@ -2139,7 +2139,7 @@ static int tiocmget(struct tty_struct *tty)

/* set modem control signals (DTR/RTS)
*/
static int tiocmset(struct tty_struct *tty, struct file *file,
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/riscom8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,8 @@ static int rc_tiocmget(struct tty_struct *tty)
return result;
}

static int rc_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int rc_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct riscom_port *port = tty->driver_data;
unsigned long flags;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,8 +1189,8 @@ static int rp_tiocmget(struct tty_struct *tty)
/*
* Sets the modem control lines
*/
static int rp_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int rp_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct r_port *info = tty->driver_data;

Expand Down
3 changes: 1 addition & 2 deletions drivers/char/serial167.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,8 +1331,7 @@ static int cy_tiocmget(struct tty_struct *tty)
} /* cy_tiocmget */

static int
cy_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
cy_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear)
{
struct cyclades_port *info = tty->driver_data;
int channel;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/specialix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ static int sx_tiocmget(struct tty_struct *tty)
}


static int sx_tiocmset(struct tty_struct *tty, struct file *file,
static int sx_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct specialix_port *port = tty->driver_data;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/stallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ static int stl_tiocmget(struct tty_struct *tty)
return stl_getsignals(portp);
}

static int stl_tiocmset(struct tty_struct *tty, struct file *file,
static int stl_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct stlport *portp;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/sx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,8 +1879,8 @@ static int sx_tiocmget(struct tty_struct *tty)
return sx_getsignals(port);
}

static int sx_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int sx_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct sx_port *port = tty->driver_data;
int rts = -1, dtr = -1;
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/synclink.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ static isr_dispatch_func UscIsrTable[7] =
* ioctl call handlers
*/
static int tiocmget(struct tty_struct *tty);
static int tiocmset(struct tty_struct *tty, struct file *file,
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount
__user *user_icount);
Expand Down Expand Up @@ -2871,8 +2871,8 @@ static int tiocmget(struct tty_struct *tty)

/* set modem control signals (DTR/RTS)
*/
static int tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct mgsl_struct *info = tty->driver_data;
unsigned long flags;
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ static int rx_enable(struct slgt_info *info, int enable);
static int modem_input_wait(struct slgt_info *info,int arg);
static int wait_mgsl_event(struct slgt_info *info, int __user *mask_ptr);
static int tiocmget(struct tty_struct *tty);
static int tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int set_break(struct tty_struct *tty, int break_state);
static int get_interface(struct slgt_info *info, int __user *if_mode);
static int set_interface(struct slgt_info *info, int if_mode);
Expand Down Expand Up @@ -3223,7 +3223,7 @@ static int tiocmget(struct tty_struct *tty)
* TIOCMSET = set/clear signal values
* value bit mask for command
*/
static int tiocmset(struct tty_struct *tty, struct file *file,
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct slgt_info *info = tty->driver_data;
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/synclinkmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ static int rx_enable(SLMP_INFO *info, int enable);
static int modem_input_wait(SLMP_INFO *info,int arg);
static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr);
static int tiocmget(struct tty_struct *tty);
static int tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int set_break(struct tty_struct *tty, int break_state);

static void add_device(SLMP_INFO *info);
Expand Down Expand Up @@ -3232,8 +3232,8 @@ static int tiocmget(struct tty_struct *tty)

/* set modem control signals (DTR/RTS)
*/
static int tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
static int tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
SLMP_INFO *info = tty->driver_data;
unsigned long flags;
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/gigaset/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static void if_throttle(struct tty_struct *tty);
static void if_unthrottle(struct tty_struct *tty);
static void if_set_termios(struct tty_struct *tty, struct ktermios *old);
static int if_tiocmget(struct tty_struct *tty);
static int if_tiocmset(struct tty_struct *tty, struct file *file,
static int if_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int if_write(struct tty_struct *tty,
const unsigned char *buf, int count);
Expand Down Expand Up @@ -303,7 +303,7 @@ static int if_tiocmget(struct tty_struct *tty)
return retval;
}

static int if_tiocmset(struct tty_struct *tty, struct file *file,
static int if_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct cardstate *cs;
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/gigaset/ser-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
if (!set && !clear)
return 0;
gig_dbg(DEBUG_IF, "tiocmset set %x clear %x", set, clear);
return tty->ops->tiocmset(tty, NULL, set, clear);
return tty->ops->tiocmset(tty, set, clear);
}

static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ isdn_tty_tiocmget(struct tty_struct *tty)
}

static int
isdn_tty_tiocmset(struct tty_struct *tty, struct file *file,
isdn_tty_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
modem_info *info = (modem_info *) tty->driver_data;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/card/sdio_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ static int sdio_uart_tiocmget(struct tty_struct *tty)
return result;
}

static int sdio_uart_tiocmset(struct tty_struct *tty, struct file *file,
static int sdio_uart_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct sdio_uart_port *port = tty->driver_data;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/irda/irtty-sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
* let's be careful... Jean II
*/
IRDA_ASSERT(priv->tty->ops->tiocmset != NULL, return -1;);
priv->tty->ops->tiocmset(priv->tty, NULL, set, clear);
priv->tty->ops->tiocmset(priv->tty, set, clear);

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ struct hso_device {
/* Prototypes */
/*****************************************************************************/
/* Serial driver functions */
static int hso_serial_tiocmset(struct tty_struct *tty, struct file *file,
static int hso_serial_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static void ctrl_callback(struct urb *urb);
static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial);
Expand Down Expand Up @@ -1335,7 +1335,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)

/* done */
if (result)
hso_serial_tiocmset(tty, NULL, TIOCM_RTS | TIOCM_DTR, 0);
hso_serial_tiocmset(tty, TIOCM_RTS | TIOCM_DTR, 0);
err_out:
mutex_unlock(&serial->parent->mutex);
return result;
Expand Down Expand Up @@ -1687,7 +1687,7 @@ static int hso_serial_tiocmget(struct tty_struct *tty)
return retval;
}

static int hso_serial_tiocmset(struct tty_struct *tty, struct file *file,
static int hso_serial_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
int val = 0;
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/wan/pc300_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ static void cpc_tty_trace(pc300dev_t *dev, char* buf, int len, char rxtx);
static void cpc_tty_signal_off(pc300dev_t *pc300dev, unsigned char);
static void cpc_tty_signal_on(pc300dev_t *pc300dev, unsigned char);

static int pc300_tiocmset(struct tty_struct *, struct file *,
unsigned int, unsigned int);
static int pc300_tiocmset(struct tty_struct *, unsigned int, unsigned int);
static int pc300_tiocmget(struct tty_struct *);

/* functions called by PC300 driver */
Expand Down Expand Up @@ -543,7 +542,7 @@ static int cpc_tty_chars_in_buffer(struct tty_struct *tty)
return 0;
}

static int pc300_tiocmset(struct tty_struct *tty, struct file *file,
static int pc300_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
st_cpc_tty_area *cpc_tty;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/quatech_usb2/quatech_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ static int qt2_tiocmget(struct tty_struct *tty)
}
}

static int qt2_tiocmset(struct tty_struct *tty, struct file *file,
static int qt2_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct usb_serial_port *port = tty->driver_data;
Expand Down
Loading

0 comments on commit 20b9d17

Please sign in to comment.