Commit 60b33c13 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

tiocmget: kill off the passing of the struct file



We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent adf9251f
......@@ -1194,7 +1194,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int __user *value)
}
static int rs_tiocmget(struct tty_struct *tty, struct file *file)
static int rs_tiocmget(struct tty_struct *tty)
{
struct async_struct * info = tty->driver_data;
unsigned char control, status;
......
......@@ -2429,7 +2429,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
return put_user(result, (unsigned long __user *)value);
}
static int cy_tiocmget(struct tty_struct *tty, struct file *file)
static int cy_tiocmget(struct tty_struct *tty)
{
struct cyclades_port *info = tty->driver_data;
struct cyclades_card *card;
......
......@@ -1982,7 +1982,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file,
return 0;
}
static int pc_tiocmget(struct tty_struct *tty, struct file *file)
static int pc_tiocmget(struct tty_struct *tty)
{
struct channel *ch = tty->driver_data;
struct board_chan __iomem *bc;
......@@ -2074,7 +2074,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,
return -EINVAL;
switch (cmd) {
case TIOCMODG:
mflag = pc_tiocmget(tty, file);
mflag = pc_tiocmget(tty);
if (put_user(mflag, (unsigned long __user *)argp))
return -EFAULT;
break;
......
......@@ -181,7 +181,7 @@ static void ip2_unthrottle(PTTY);
static void ip2_stop(PTTY);
static void ip2_start(PTTY);
static void ip2_hangup(PTTY);
static int ip2_tiocmget(struct tty_struct *tty, struct file *file);
static int ip2_tiocmget(struct tty_struct *tty);
static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static int ip2_get_icount(struct tty_struct *tty,
......@@ -2038,7 +2038,7 @@ ip2_stop ( PTTY tty )
/* Device Ioctl Section */
/******************************************************************************/
static int ip2_tiocmget(struct tty_struct *tty, struct file *file)
static int ip2_tiocmget(struct tty_struct *tty)
{
i2ChanStrPtr pCh = DevTable[tty->index];
#ifdef ENABLE_DSSNOW
......
......@@ -1065,7 +1065,7 @@ static int isicom_send_break(struct tty_struct *tty, int length)
return 0;
}
static int isicom_tiocmget(struct tty_struct *tty, struct file *file)
static int isicom_tiocmget(struct tty_struct *tty)
{
struct isi_port *port = tty->driver_data;
/* just send the port status */
......
......@@ -1501,7 +1501,7 @@ static int stli_setserial(struct tty_struct *tty, struct serial_struct __user *s
/*****************************************************************************/
static int stli_tiocmget(struct tty_struct *tty, struct file *file)
static int stli_tiocmget(struct tty_struct *tty)
{
struct stliport *portp = tty->driver_data;
struct stlibrd *brdp;
......
......@@ -199,7 +199,7 @@ static void moxa_set_termios(struct tty_struct *, struct ktermios *);
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, struct file *file);
static int moxa_tiocmget(struct tty_struct *tty);
static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static void moxa_poll(unsigned long);
......@@ -1257,7 +1257,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
return chars;
}
static int moxa_tiocmget(struct tty_struct *tty, struct file *file)
static int moxa_tiocmget(struct tty_struct *tty)
{
struct moxa_port *ch = tty->driver_data;
int flag = 0, dtr, rts;
......
......@@ -1320,7 +1320,7 @@ static int mxser_get_lsr_info(struct mxser_port *info,
return put_user(result, value);
}
static int mxser_tiocmget(struct tty_struct *tty, struct file *file)
static int mxser_tiocmget(struct tty_struct *tty)
{
struct mxser_port *info = tty->driver_data;
unsigned char control, status;
......
......@@ -1750,7 +1750,7 @@ static int ntty_write_room(struct tty_struct *tty)
}
/* Gets io control parameters */
static int ntty_tiocmget(struct tty_struct *tty, struct file *file)
static int ntty_tiocmget(struct tty_struct *tty)
{
const struct port *port = tty->driver_data;
const struct ctrl_dl *ctrl_dl = &port->ctrl_dl;
......
......@@ -395,7 +395,7 @@ static int set_control_lines(struct ipw_tty *tty, unsigned int set,
return 0;
}
static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file)
static int ipw_tiocmget(struct tty_struct *linux_tty)
{
struct ipw_tty *tty = linux_tty->driver_data;
/* FIXME: Exactly how is the tty object locked here .. */
......
......@@ -418,7 +418,7 @@ static void bh_status(MGSLPC_INFO *info);
/*
* ioctl handlers
*/
static int tiocmget(struct tty_struct *tty, struct file *file);
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 get_stats(MGSLPC_INFO *info, struct mgsl_icount __user *user_icount);
......@@ -2114,7 +2114,7 @@ static int modem_input_wait(MGSLPC_INFO *info,int arg)
/* return the state of the serial control and status signals
*/
static int tiocmget(struct tty_struct *tty, struct file *file)
static int tiocmget(struct tty_struct *tty)
{
MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
unsigned int result;
......
......@@ -1086,7 +1086,7 @@ static int rc_chars_in_buffer(struct tty_struct *tty)
return port->xmit_cnt;
}
static int rc_tiocmget(struct tty_struct *tty, struct file *file)
static int rc_tiocmget(struct tty_struct *tty)
{
struct riscom_port *port = tty->driver_data;
struct riscom_board *bp;
......
......@@ -1169,7 +1169,7 @@ static int sGetChanRI(CHANNEL_T * ChP)
* Returns the state of the serial modem control lines. These next 2 functions
* are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs.
*/
static int rp_tiocmget(struct tty_struct *tty, struct file *file)
static int rp_tiocmget(struct tty_struct *tty)
{
struct r_port *info = tty->driver_data;
unsigned int control, result, ChanStatus;
......
......@@ -1308,7 +1308,7 @@ check_and_exit:
return startup(info);
} /* set_serial_info */
static int cy_tiocmget(struct tty_struct *tty, struct file *file)
static int cy_tiocmget(struct tty_struct *tty)
{
struct cyclades_port *info = tty->driver_data;
int channel;
......
......@@ -1737,7 +1737,7 @@ static int sx_chars_in_buffer(struct tty_struct *tty)
return port->xmit_cnt;
}
static int sx_tiocmget(struct tty_struct *tty, struct file *file)
static int sx_tiocmget(struct tty_struct *tty)
{
struct specialix_port *port = tty->driver_data;
struct specialix_board *bp;
......
......@@ -1094,7 +1094,7 @@ static int stl_setserial(struct tty_struct *tty, struct serial_struct __user *sp
/*****************************************************************************/
static int stl_tiocmget(struct tty_struct *tty, struct file *file)
static int stl_tiocmget(struct tty_struct *tty)
{
struct stlport *portp;
......
......@@ -1873,7 +1873,7 @@ static int sx_break(struct tty_struct *tty, int flag)
return 0;
}
static int sx_tiocmget(struct tty_struct *tty, struct file *file)
static int sx_tiocmget(struct tty_struct *tty)
{
struct sx_port *port = tty->driver_data;
return sx_getsignals(port);
......
......@@ -823,7 +823,7 @@ static isr_dispatch_func UscIsrTable[7] =
/*
* ioctl call handlers
*/
static int tiocmget(struct tty_struct *tty, struct file *file);
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 mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount
......@@ -2846,7 +2846,7 @@ static int modem_input_wait(struct mgsl_struct *info,int arg)
/* return the state of the serial control and status signals
*/
static int tiocmget(struct tty_struct *tty, struct file *file)
static int tiocmget(struct tty_struct *tty)
{
struct mgsl_struct *info = tty->driver_data;
unsigned int result;
......
......@@ -512,7 +512,7 @@ static int tx_abort(struct slgt_info *info);
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, struct file *file);
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 set_break(struct tty_struct *tty, int break_state);
......@@ -3195,7 +3195,7 @@ static int modem_input_wait(struct slgt_info *info,int arg)
/*
* return state of serial control and status signals
*/
static int tiocmget(struct tty_struct *tty, struct file *file)
static int tiocmget(struct tty_struct *tty)
{
struct slgt_info *info = tty->driver_data;
unsigned int result;
......
......@@ -546,7 +546,7 @@ static int tx_abort(SLMP_INFO *info);
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, struct file *file);
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 set_break(struct tty_struct *tty, int break_state);
......@@ -3207,7 +3207,7 @@ static int modem_input_wait(SLMP_INFO *info,int arg)
/* return the state of the serial control and status signals
*/
static int tiocmget(struct tty_struct *tty, struct file *file)
static int tiocmget(struct tty_struct *tty)
{
SLMP_INFO *info = tty->driver_data;
unsigned int result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment