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: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 6ee3348..bc67e68 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -1194,7 +1194,7 @@
 }
 
 
-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;
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 4f152c2..e7945dd 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2429,7 +2429,7 @@
 	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;
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index d9df46a..ecf6f0a 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -1982,7 +1982,7 @@
 	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 @@
 		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;
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index c3a0253..476cd08 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -181,7 +181,7 @@
 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 @@
 /* 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
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index c27e9d2..836370b 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1065,7 +1065,7 @@
 	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 */
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 7c6de4c..7843a84 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -1501,7 +1501,7 @@
 
 /*****************************************************************************/
 
-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;
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 107b0bd..fdf069b 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -199,7 +199,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, 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 @@
 	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;
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index dd9d753..4d2f03e 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1320,7 +1320,7 @@
 	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;
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 294d03e..0e1dff2 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1750,7 +1750,7 @@
 }
 
 /* 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;
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index f5eb28b..7d2ef49 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -395,7 +395,7 @@
 	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 .. */
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index eaa4199..7b68ba6 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -418,7 +418,7 @@
 /*
  * 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 @@
 
 /* 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;
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index af4de1f..5d0c984 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1086,7 +1086,7 @@
 	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;
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 3e4e73a..75e98ef 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1169,7 +1169,7 @@
  *  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;
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 748c3b0..fda9064 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -1308,7 +1308,7 @@
 	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;
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index c2bca3f..bfecfbe 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -1737,7 +1737,7 @@
 	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;
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 461a5a0..8c2bf3f 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -1094,7 +1094,7 @@
 
 /*****************************************************************************/
 
-static int stl_tiocmget(struct tty_struct *tty, struct file *file)
+static int stl_tiocmget(struct tty_struct *tty)
 {
 	struct stlport	*portp;
 
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index a786326..f46214e 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1873,7 +1873,7 @@
 	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);
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 3a6824f..d359e09 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -823,7 +823,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 @@
 
 /* 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;
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index d01fffe..f18ab8af 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -512,7 +512,7 @@
 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 @@
 /*
  *  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;
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 2f9eb4b..5900213 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -546,7 +546,7 @@
 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 @@
 
 /* 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;