aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-02-14 11:26:14 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 14:47:33 -0500
commit60b33c133ca0b7c0b6072c87234b63fee6e80558 (patch)
tree379340a7ab563df42ddb2907be6f282202244077 /drivers/char
parentadf9251fe9b87b5a50deebe489db2df8df4715fc (diff)
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/amiserial.c2
-rw-r--r--drivers/char/cyclades.c2
-rw-r--r--drivers/char/epca.c4
-rw-r--r--drivers/char/ip2/ip2main.c4
-rw-r--r--drivers/char/isicom.c2
-rw-r--r--drivers/char/istallion.c2
-rw-r--r--drivers/char/moxa.c4
-rw-r--r--drivers/char/mxser.c2
-rw-r--r--drivers/char/nozomi.c2
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c2
-rw-r--r--drivers/char/pcmcia/synclink_cs.c4
-rw-r--r--drivers/char/riscom8.c2
-rw-r--r--drivers/char/rocket.c2
-rw-r--r--drivers/char/serial167.c2
-rw-r--r--drivers/char/specialix.c2
-rw-r--r--drivers/char/stallion.c2
-rw-r--r--drivers/char/sx.c2
-rw-r--r--drivers/char/synclink.c4
-rw-r--r--drivers/char/synclink_gt.c4
-rw-r--r--drivers/char/synclinkmp.c4
20 files changed, 27 insertions, 27 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 6ee3348bc3e4..bc67e6839059 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -1194,7 +1194,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int __user *value)
1194} 1194}
1195 1195
1196 1196
1197static int rs_tiocmget(struct tty_struct *tty, struct file *file) 1197static int rs_tiocmget(struct tty_struct *tty)
1198{ 1198{
1199 struct async_struct * info = tty->driver_data; 1199 struct async_struct * info = tty->driver_data;
1200 unsigned char control, status; 1200 unsigned char control, status;
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 4f152c28f40e..e7945ddacd18 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2429,7 +2429,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
2429 return put_user(result, (unsigned long __user *)value); 2429 return put_user(result, (unsigned long __user *)value);
2430} 2430}
2431 2431
2432static int cy_tiocmget(struct tty_struct *tty, struct file *file) 2432static int cy_tiocmget(struct tty_struct *tty)
2433{ 2433{
2434 struct cyclades_port *info = tty->driver_data; 2434 struct cyclades_port *info = tty->driver_data;
2435 struct cyclades_card *card; 2435 struct cyclades_card *card;
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index d9df46aa0fba..ecf6f0a889fc 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -1982,7 +1982,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file,
1982 return 0; 1982 return 0;
1983} 1983}
1984 1984
1985static int pc_tiocmget(struct tty_struct *tty, struct file *file) 1985static int pc_tiocmget(struct tty_struct *tty)
1986{ 1986{
1987 struct channel *ch = tty->driver_data; 1987 struct channel *ch = tty->driver_data;
1988 struct board_chan __iomem *bc; 1988 struct board_chan __iomem *bc;
@@ -2074,7 +2074,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,
2074 return -EINVAL; 2074 return -EINVAL;
2075 switch (cmd) { 2075 switch (cmd) {
2076 case TIOCMODG: 2076 case TIOCMODG:
2077 mflag = pc_tiocmget(tty, file); 2077 mflag = pc_tiocmget(tty);
2078 if (put_user(mflag, (unsigned long __user *)argp)) 2078 if (put_user(mflag, (unsigned long __user *)argp))
2079 return -EFAULT; 2079 return -EFAULT;
2080 break; 2080 break;
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index c3a025356b8b..476cd087118e 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -181,7 +181,7 @@ static void ip2_unthrottle(PTTY);
181static void ip2_stop(PTTY); 181static void ip2_stop(PTTY);
182static void ip2_start(PTTY); 182static void ip2_start(PTTY);
183static void ip2_hangup(PTTY); 183static void ip2_hangup(PTTY);
184static int ip2_tiocmget(struct tty_struct *tty, struct file *file); 184static int ip2_tiocmget(struct tty_struct *tty);
185static int ip2_tiocmset(struct tty_struct *tty, struct file *file, 185static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
186 unsigned int set, unsigned int clear); 186 unsigned int set, unsigned int clear);
187static int ip2_get_icount(struct tty_struct *tty, 187static int ip2_get_icount(struct tty_struct *tty,
@@ -2038,7 +2038,7 @@ ip2_stop ( PTTY tty )
2038/* Device Ioctl Section */ 2038/* Device Ioctl Section */
2039/******************************************************************************/ 2039/******************************************************************************/
2040 2040
2041static int ip2_tiocmget(struct tty_struct *tty, struct file *file) 2041static int ip2_tiocmget(struct tty_struct *tty)
2042{ 2042{
2043 i2ChanStrPtr pCh = DevTable[tty->index]; 2043 i2ChanStrPtr pCh = DevTable[tty->index];
2044#ifdef ENABLE_DSSNOW 2044#ifdef ENABLE_DSSNOW
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index c27e9d21fea9..836370bc04c2 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1065,7 +1065,7 @@ static int isicom_send_break(struct tty_struct *tty, int length)
1065 return 0; 1065 return 0;
1066} 1066}
1067 1067
1068static int isicom_tiocmget(struct tty_struct *tty, struct file *file) 1068static int isicom_tiocmget(struct tty_struct *tty)
1069{ 1069{
1070 struct isi_port *port = tty->driver_data; 1070 struct isi_port *port = tty->driver_data;
1071 /* just send the port status */ 1071 /* just send the port status */
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 7c6de4c92458..7843a847b76a 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -1501,7 +1501,7 @@ static int stli_setserial(struct tty_struct *tty, struct serial_struct __user *s
1501 1501
1502/*****************************************************************************/ 1502/*****************************************************************************/
1503 1503
1504static int stli_tiocmget(struct tty_struct *tty, struct file *file) 1504static int stli_tiocmget(struct tty_struct *tty)
1505{ 1505{
1506 struct stliport *portp = tty->driver_data; 1506 struct stliport *portp = tty->driver_data;
1507 struct stlibrd *brdp; 1507 struct stlibrd *brdp;
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 107b0bd58d19..fdf069bb702f 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -199,7 +199,7 @@ static void moxa_set_termios(struct tty_struct *, struct ktermios *);
199static void moxa_stop(struct tty_struct *); 199static void moxa_stop(struct tty_struct *);
200static void moxa_start(struct tty_struct *); 200static void moxa_start(struct tty_struct *);
201static void moxa_hangup(struct tty_struct *); 201static void moxa_hangup(struct tty_struct *);
202static int moxa_tiocmget(struct tty_struct *tty, struct file *file); 202static int moxa_tiocmget(struct tty_struct *tty);
203static int moxa_tiocmset(struct tty_struct *tty, struct file *file, 203static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
204 unsigned int set, unsigned int clear); 204 unsigned int set, unsigned int clear);
205static void moxa_poll(unsigned long); 205static void moxa_poll(unsigned long);
@@ -1257,7 +1257,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
1257 return chars; 1257 return chars;
1258} 1258}
1259 1259
1260static int moxa_tiocmget(struct tty_struct *tty, struct file *file) 1260static int moxa_tiocmget(struct tty_struct *tty)
1261{ 1261{
1262 struct moxa_port *ch = tty->driver_data; 1262 struct moxa_port *ch = tty->driver_data;
1263 int flag = 0, dtr, rts; 1263 int flag = 0, dtr, rts;
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index dd9d75351cd6..4d2f03ec06cd 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1320,7 +1320,7 @@ static int mxser_get_lsr_info(struct mxser_port *info,
1320 return put_user(result, value); 1320 return put_user(result, value);
1321} 1321}
1322 1322
1323static int mxser_tiocmget(struct tty_struct *tty, struct file *file) 1323static int mxser_tiocmget(struct tty_struct *tty)
1324{ 1324{
1325 struct mxser_port *info = tty->driver_data; 1325 struct mxser_port *info = tty->driver_data;
1326 unsigned char control, status; 1326 unsigned char control, status;
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 294d03e8c61a..0e1dff2ffb1e 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1750,7 +1750,7 @@ static int ntty_write_room(struct tty_struct *tty)
1750} 1750}
1751 1751
1752/* Gets io control parameters */ 1752/* Gets io control parameters */
1753static int ntty_tiocmget(struct tty_struct *tty, struct file *file) 1753static int ntty_tiocmget(struct tty_struct *tty)
1754{ 1754{
1755 const struct port *port = tty->driver_data; 1755 const struct port *port = tty->driver_data;
1756 const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; 1756 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 f5eb28b6cb0f..7d2ef4909a73 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -395,7 +395,7 @@ static int set_control_lines(struct ipw_tty *tty, unsigned int set,
395 return 0; 395 return 0;
396} 396}
397 397
398static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file) 398static int ipw_tiocmget(struct tty_struct *linux_tty)
399{ 399{
400 struct ipw_tty *tty = linux_tty->driver_data; 400 struct ipw_tty *tty = linux_tty->driver_data;
401 /* FIXME: Exactly how is the tty object locked here .. */ 401 /* 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 eaa41992fbe2..7b68ba6609fe 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -418,7 +418,7 @@ static void bh_status(MGSLPC_INFO *info);
418/* 418/*
419 * ioctl handlers 419 * ioctl handlers
420 */ 420 */
421static int tiocmget(struct tty_struct *tty, struct file *file); 421static int tiocmget(struct tty_struct *tty);
422static int tiocmset(struct tty_struct *tty, struct file *file, 422static int tiocmset(struct tty_struct *tty, struct file *file,
423 unsigned int set, unsigned int clear); 423 unsigned int set, unsigned int clear);
424static int get_stats(MGSLPC_INFO *info, struct mgsl_icount __user *user_icount); 424static 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)
2114 2114
2115/* return the state of the serial control and status signals 2115/* return the state of the serial control and status signals
2116 */ 2116 */
2117static int tiocmget(struct tty_struct *tty, struct file *file) 2117static int tiocmget(struct tty_struct *tty)
2118{ 2118{
2119 MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data; 2119 MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
2120 unsigned int result; 2120 unsigned int result;
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index af4de1fe8445..5d0c98456c93 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1086,7 +1086,7 @@ static int rc_chars_in_buffer(struct tty_struct *tty)
1086 return port->xmit_cnt; 1086 return port->xmit_cnt;
1087} 1087}
1088 1088
1089static int rc_tiocmget(struct tty_struct *tty, struct file *file) 1089static int rc_tiocmget(struct tty_struct *tty)
1090{ 1090{
1091 struct riscom_port *port = tty->driver_data; 1091 struct riscom_port *port = tty->driver_data;
1092 struct riscom_board *bp; 1092 struct riscom_board *bp;
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 3e4e73a0d7c1..75e98efbc8e9 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1169,7 +1169,7 @@ static int sGetChanRI(CHANNEL_T * ChP)
1169 * Returns the state of the serial modem control lines. These next 2 functions 1169 * Returns the state of the serial modem control lines. These next 2 functions
1170 * are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs. 1170 * are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs.
1171 */ 1171 */
1172static int rp_tiocmget(struct tty_struct *tty, struct file *file) 1172static int rp_tiocmget(struct tty_struct *tty)
1173{ 1173{
1174 struct r_port *info = tty->driver_data; 1174 struct r_port *info = tty->driver_data;
1175 unsigned int control, result, ChanStatus; 1175 unsigned int control, result, ChanStatus;
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 748c3b0ecd89..fda90643ead7 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -1308,7 +1308,7 @@ check_and_exit:
1308 return startup(info); 1308 return startup(info);
1309} /* set_serial_info */ 1309} /* set_serial_info */
1310 1310
1311static int cy_tiocmget(struct tty_struct *tty, struct file *file) 1311static int cy_tiocmget(struct tty_struct *tty)
1312{ 1312{
1313 struct cyclades_port *info = tty->driver_data; 1313 struct cyclades_port *info = tty->driver_data;
1314 int channel; 1314 int channel;
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index c2bca3f25ef3..bfecfbef0895 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -1737,7 +1737,7 @@ static int sx_chars_in_buffer(struct tty_struct *tty)
1737 return port->xmit_cnt; 1737 return port->xmit_cnt;
1738} 1738}
1739 1739
1740static int sx_tiocmget(struct tty_struct *tty, struct file *file) 1740static int sx_tiocmget(struct tty_struct *tty)
1741{ 1741{
1742 struct specialix_port *port = tty->driver_data; 1742 struct specialix_port *port = tty->driver_data;
1743 struct specialix_board *bp; 1743 struct specialix_board *bp;
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 461a5a045517..8c2bf3fb5b89 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -1094,7 +1094,7 @@ static int stl_setserial(struct tty_struct *tty, struct serial_struct __user *sp
1094 1094
1095/*****************************************************************************/ 1095/*****************************************************************************/
1096 1096
1097static int stl_tiocmget(struct tty_struct *tty, struct file *file) 1097static int stl_tiocmget(struct tty_struct *tty)
1098{ 1098{
1099 struct stlport *portp; 1099 struct stlport *portp;
1100 1100
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index a786326cea2f..f46214e60d0c 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1873,7 +1873,7 @@ static int sx_break(struct tty_struct *tty, int flag)
1873 return 0; 1873 return 0;
1874} 1874}
1875 1875
1876static int sx_tiocmget(struct tty_struct *tty, struct file *file) 1876static int sx_tiocmget(struct tty_struct *tty)
1877{ 1877{
1878 struct sx_port *port = tty->driver_data; 1878 struct sx_port *port = tty->driver_data;
1879 return sx_getsignals(port); 1879 return sx_getsignals(port);
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 3a6824f12be2..d359e092904a 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -823,7 +823,7 @@ static isr_dispatch_func UscIsrTable[7] =
823/* 823/*
824 * ioctl call handlers 824 * ioctl call handlers
825 */ 825 */
826static int tiocmget(struct tty_struct *tty, struct file *file); 826static int tiocmget(struct tty_struct *tty);
827static int tiocmset(struct tty_struct *tty, struct file *file, 827static int tiocmset(struct tty_struct *tty, struct file *file,
828 unsigned int set, unsigned int clear); 828 unsigned int set, unsigned int clear);
829static int mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount 829static 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)
2846 2846
2847/* return the state of the serial control and status signals 2847/* return the state of the serial control and status signals
2848 */ 2848 */
2849static int tiocmget(struct tty_struct *tty, struct file *file) 2849static int tiocmget(struct tty_struct *tty)
2850{ 2850{
2851 struct mgsl_struct *info = tty->driver_data; 2851 struct mgsl_struct *info = tty->driver_data;
2852 unsigned int result; 2852 unsigned int result;
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index d01fffeac951..f18ab8af0e1c 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -512,7 +512,7 @@ static int tx_abort(struct slgt_info *info);
512static int rx_enable(struct slgt_info *info, int enable); 512static int rx_enable(struct slgt_info *info, int enable);
513static int modem_input_wait(struct slgt_info *info,int arg); 513static int modem_input_wait(struct slgt_info *info,int arg);
514static int wait_mgsl_event(struct slgt_info *info, int __user *mask_ptr); 514static int wait_mgsl_event(struct slgt_info *info, int __user *mask_ptr);
515static int tiocmget(struct tty_struct *tty, struct file *file); 515static int tiocmget(struct tty_struct *tty);
516static int tiocmset(struct tty_struct *tty, struct file *file, 516static int tiocmset(struct tty_struct *tty, struct file *file,
517 unsigned int set, unsigned int clear); 517 unsigned int set, unsigned int clear);
518static int set_break(struct tty_struct *tty, int break_state); 518static 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)
3195/* 3195/*
3196 * return state of serial control and status signals 3196 * return state of serial control and status signals
3197 */ 3197 */
3198static int tiocmget(struct tty_struct *tty, struct file *file) 3198static int tiocmget(struct tty_struct *tty)
3199{ 3199{
3200 struct slgt_info *info = tty->driver_data; 3200 struct slgt_info *info = tty->driver_data;
3201 unsigned int result; 3201 unsigned int result;
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 2f9eb4b0dec1..5900213ae75b 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -546,7 +546,7 @@ static int tx_abort(SLMP_INFO *info);
546static int rx_enable(SLMP_INFO *info, int enable); 546static int rx_enable(SLMP_INFO *info, int enable);
547static int modem_input_wait(SLMP_INFO *info,int arg); 547static int modem_input_wait(SLMP_INFO *info,int arg);
548static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr); 548static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr);
549static int tiocmget(struct tty_struct *tty, struct file *file); 549static int tiocmget(struct tty_struct *tty);
550static int tiocmset(struct tty_struct *tty, struct file *file, 550static int tiocmset(struct tty_struct *tty, struct file *file,
551 unsigned int set, unsigned int clear); 551 unsigned int set, unsigned int clear);
552static int set_break(struct tty_struct *tty, int break_state); 552static int set_break(struct tty_struct *tty, int break_state);
@@ -3207,7 +3207,7 @@ static int modem_input_wait(SLMP_INFO *info,int arg)
3207 3207
3208/* return the state of the serial control and status signals 3208/* return the state of the serial control and status signals
3209 */ 3209 */
3210static int tiocmget(struct tty_struct *tty, struct file *file) 3210static int tiocmget(struct tty_struct *tty)
3211{ 3211{
3212 SLMP_INFO *info = tty->driver_data; 3212 SLMP_INFO *info = tty->driver_data;
3213 unsigned int result; 3213 unsigned int result;