aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-02-14 11:27:22 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 14:59:56 -0500
commit6caa76b7786891b42b66a0e61e2c2fff2c884620 (patch)
treeeb6e387e080a44680d6d8686999336e69ec97e71
parent00a0d0d65b61241a718d0aee96f46b9a2d93bf26 (diff)
tty: now phase out the ioctl file pointer for good
Only oddities here are a couple of drivers that bogusly called the ldisc helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes away. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/char/amiserial.c2
-rw-r--r--drivers/char/cyclades.c2
-rw-r--r--drivers/char/epca.c8
-rw-r--r--drivers/char/ip2/ip2main.c4
-rw-r--r--drivers/char/isicom.c2
-rw-r--r--drivers/char/istallion.c4
-rw-r--r--drivers/char/moxa.c2
-rw-r--r--drivers/char/mxser.c2
-rw-r--r--drivers/char/nozomi.c2
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c4
-rw-r--r--drivers/char/riscom8.c2
-rw-r--r--drivers/char/rocket.c2
-rw-r--r--drivers/char/ser_a2232.c6
-rw-r--r--drivers/char/serial167.c2
-rw-r--r--drivers/char/specialix.c2
-rw-r--r--drivers/char/stallion.c5
-rw-r--r--drivers/char/sx.c2
-rw-r--r--drivers/char/synclink.c3
-rw-r--r--drivers/char/synclink_gt.c9
-rw-r--r--drivers/char/synclinkmp.c5
-rw-r--r--drivers/char/ttyprintk.c2
-rw-r--r--drivers/char/vme_scc.c4
-rw-r--r--drivers/isdn/capi/capi.c10
-rw-r--r--drivers/isdn/gigaset/interface.c4
-rw-r--r--drivers/isdn/i4l/isdn_tty.c3
-rw-r--r--drivers/net/usb/hso.c2
-rw-r--r--drivers/tty/n_gsm.c2
-rw-r--r--drivers/tty/pty.c4
-rw-r--r--drivers/tty/serial/68328serial.c2
-rw-r--r--drivers/tty/serial/68360serial.c2
-rw-r--r--drivers/tty/serial/crisv10.c2
-rw-r--r--drivers/tty/serial/serial_core.c4
-rw-r--r--drivers/tty/tty_io.c4
-rw-r--r--drivers/tty/vt/vt_ioctl.c6
-rw-r--r--drivers/usb/class/cdc-acm.c2
-rw-r--r--drivers/usb/serial/usb-serial.c2
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_driver.h9
-rw-r--r--include/net/irda/ircomm_tty.h2
-rw-r--r--net/bluetooth/rfcomm/tty.c2
-rw-r--r--net/irda/ircomm/ircomm_tty_ioctl.c4
41 files changed, 66 insertions, 78 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 5c15fad71ad2..f214e5022472 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -1293,7 +1293,7 @@ static int rs_get_icount(struct tty_struct *tty,
1293 return 0; 1293 return 0;
1294} 1294}
1295 1295
1296static int rs_ioctl(struct tty_struct *tty, struct file * file, 1296static int rs_ioctl(struct tty_struct *tty,
1297 unsigned int cmd, unsigned long arg) 1297 unsigned int cmd, unsigned long arg)
1298{ 1298{
1299 struct async_struct * info = tty->driver_data; 1299 struct async_struct * info = tty->driver_data;
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 942b6f2b70a4..c99728f0cd9f 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2680,7 +2680,7 @@ static int cy_cflags_changed(struct cyclades_port *info, unsigned long arg,
2680 * not recognized by the driver, it should return ENOIOCTLCMD. 2680 * not recognized by the driver, it should return ENOIOCTLCMD.
2681 */ 2681 */
2682static int 2682static int
2683cy_ioctl(struct tty_struct *tty, struct file *file, 2683cy_ioctl(struct tty_struct *tty,
2684 unsigned int cmd, unsigned long arg) 2684 unsigned int cmd, unsigned long arg)
2685{ 2685{
2686 struct cyclades_port *info = tty->driver_data; 2686 struct cyclades_port *info = tty->driver_data;
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index e5872b59f9cd..7ad3638967ae 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -175,9 +175,9 @@ static unsigned termios2digi_i(struct channel *ch, unsigned);
175static unsigned termios2digi_c(struct channel *ch, unsigned); 175static unsigned termios2digi_c(struct channel *ch, unsigned);
176static void epcaparam(struct tty_struct *, struct channel *); 176static void epcaparam(struct tty_struct *, struct channel *);
177static void receive_data(struct channel *, struct tty_struct *tty); 177static void receive_data(struct channel *, struct tty_struct *tty);
178static int pc_ioctl(struct tty_struct *, struct file *, 178static int pc_ioctl(struct tty_struct *,
179 unsigned int, unsigned long); 179 unsigned int, unsigned long);
180static int info_ioctl(struct tty_struct *, struct file *, 180static int info_ioctl(struct tty_struct *,
181 unsigned int, unsigned long); 181 unsigned int, unsigned long);
182static void pc_set_termios(struct tty_struct *, struct ktermios *); 182static void pc_set_termios(struct tty_struct *, struct ktermios *);
183static void do_softint(struct work_struct *work); 183static void do_softint(struct work_struct *work);
@@ -1919,7 +1919,7 @@ static void receive_data(struct channel *ch, struct tty_struct *tty)
1919 tty_schedule_flip(tty); 1919 tty_schedule_flip(tty);
1920} 1920}
1921 1921
1922static int info_ioctl(struct tty_struct *tty, struct file *file, 1922static int info_ioctl(struct tty_struct *tty,
1923 unsigned int cmd, unsigned long arg) 1923 unsigned int cmd, unsigned long arg)
1924{ 1924{
1925 switch (cmd) { 1925 switch (cmd) {
@@ -2057,7 +2057,7 @@ static int pc_tiocmset(struct tty_struct *tty,
2057 return 0; 2057 return 0;
2058} 2058}
2059 2059
2060static int pc_ioctl(struct tty_struct *tty, struct file *file, 2060static int pc_ioctl(struct tty_struct *tty,
2061 unsigned int cmd, unsigned long arg) 2061 unsigned int cmd, unsigned long arg)
2062{ 2062{
2063 digiflow_t dflow; 2063 digiflow_t dflow;
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index d5f866c7c672..ea7a8fb08283 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -173,7 +173,7 @@ static void ip2_flush_chars(PTTY);
173static int ip2_write_room(PTTY); 173static int ip2_write_room(PTTY);
174static int ip2_chars_in_buf(PTTY); 174static int ip2_chars_in_buf(PTTY);
175static void ip2_flush_buffer(PTTY); 175static void ip2_flush_buffer(PTTY);
176static int ip2_ioctl(PTTY, struct file *, UINT, ULONG); 176static int ip2_ioctl(PTTY, UINT, ULONG);
177static void ip2_set_termios(PTTY, struct ktermios *); 177static void ip2_set_termios(PTTY, struct ktermios *);
178static void ip2_set_line_discipline(PTTY); 178static void ip2_set_line_discipline(PTTY);
179static void ip2_throttle(PTTY); 179static void ip2_throttle(PTTY);
@@ -2127,7 +2127,7 @@ static int ip2_tiocmset(struct tty_struct *tty,
2127/* */ 2127/* */
2128/******************************************************************************/ 2128/******************************************************************************/
2129static int 2129static int
2130ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg ) 2130ip2_ioctl ( PTTY tty, UINT cmd, ULONG arg )
2131{ 2131{
2132 wait_queue_t wait; 2132 wait_queue_t wait;
2133 i2ChanStrPtr pCh = DevTable[tty->index]; 2133 i2ChanStrPtr pCh = DevTable[tty->index];
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 60f4d8ae7a49..db1cf9c328d8 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1167,7 +1167,7 @@ static int isicom_get_serial_info(struct isi_port *port,
1167 return 0; 1167 return 0;
1168} 1168}
1169 1169
1170static int isicom_ioctl(struct tty_struct *tty, struct file *filp, 1170static int isicom_ioctl(struct tty_struct *tty,
1171 unsigned int cmd, unsigned long arg) 1171 unsigned int cmd, unsigned long arg)
1172{ 1172{
1173 struct isi_port *port = tty->driver_data; 1173 struct isi_port *port = tty->driver_data;
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 763b58d58255..0b266272cccd 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -603,7 +603,7 @@ static int stli_putchar(struct tty_struct *tty, unsigned char ch);
603static void stli_flushchars(struct tty_struct *tty); 603static void stli_flushchars(struct tty_struct *tty);
604static int stli_writeroom(struct tty_struct *tty); 604static int stli_writeroom(struct tty_struct *tty);
605static int stli_charsinbuffer(struct tty_struct *tty); 605static int stli_charsinbuffer(struct tty_struct *tty);
606static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); 606static int stli_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
607static void stli_settermios(struct tty_struct *tty, struct ktermios *old); 607static void stli_settermios(struct tty_struct *tty, struct ktermios *old);
608static void stli_throttle(struct tty_struct *tty); 608static void stli_throttle(struct tty_struct *tty);
609static void stli_unthrottle(struct tty_struct *tty); 609static void stli_unthrottle(struct tty_struct *tty);
@@ -1556,7 +1556,7 @@ static int stli_tiocmset(struct tty_struct *tty,
1556 sizeof(asysigs_t), 0); 1556 sizeof(asysigs_t), 0);
1557} 1557}
1558 1558
1559static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) 1559static int stli_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
1560{ 1560{
1561 struct stliport *portp; 1561 struct stliport *portp;
1562 struct stlibrd *brdp; 1562 struct stlibrd *brdp;
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 9f4cd8968a5a..35b0c38590e6 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -287,7 +287,7 @@ static void moxa_low_water_check(void __iomem *ofsAddr)
287 * TTY operations 287 * TTY operations
288 */ 288 */
289 289
290static int moxa_ioctl(struct tty_struct *tty, struct file *file, 290static int moxa_ioctl(struct tty_struct *tty,
291 unsigned int cmd, unsigned long arg) 291 unsigned int cmd, unsigned long arg)
292{ 292{
293 struct moxa_port *ch = tty->driver_data; 293 struct moxa_port *ch = tty->driver_data;
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 150a862c4989..d188f378684d 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1655,7 +1655,7 @@ static int mxser_cflags_changed(struct mxser_port *info, unsigned long arg,
1655 return ret; 1655 return ret;
1656} 1656}
1657 1657
1658static int mxser_ioctl(struct tty_struct *tty, struct file *file, 1658static int mxser_ioctl(struct tty_struct *tty,
1659 unsigned int cmd, unsigned long arg) 1659 unsigned int cmd, unsigned long arg)
1660{ 1660{
1661 struct mxser_port *info = tty->driver_data; 1661 struct mxser_port *info = tty->driver_data;
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 1b74c48c4016..513ba12064ea 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1824,7 +1824,7 @@ static int ntty_tiocgicount(struct tty_struct *tty,
1824 return 0; 1824 return 0;
1825} 1825}
1826 1826
1827static int ntty_ioctl(struct tty_struct *tty, struct file *file, 1827static int ntty_ioctl(struct tty_struct *tty,
1828 unsigned int cmd, unsigned long arg) 1828 unsigned int cmd, unsigned long arg)
1829{ 1829{
1830 struct port *port = tty->driver_data; 1830 struct port *port = tty->driver_data;
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index 748190dfbab0..ef92869502a7 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -425,7 +425,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,
425 return set_control_lines(tty, set, clear); 425 return set_control_lines(tty, set, clear);
426} 426}
427 427
428static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file, 428static int ipw_ioctl(struct tty_struct *linux_tty,
429 unsigned int cmd, unsigned long arg) 429 unsigned int cmd, unsigned long arg)
430{ 430{
431 struct ipw_tty *tty = linux_tty->driver_data; 431 struct ipw_tty *tty = linux_tty->driver_data;
@@ -484,7 +484,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
484 return tty_perform_flush(linux_tty, arg); 484 return tty_perform_flush(linux_tty, arg);
485 } 485 }
486 } 486 }
487 return tty_mode_ioctl(linux_tty, file, cmd , arg); 487 return -ENOIOCTLCMD;
488} 488}
489 489
490static int add_tty(int j, 490static int add_tty(int j,
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 3666decc6438..602643a40b4b 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1236,7 +1236,7 @@ static int rc_get_serial_info(struct riscom_port *port,
1236 return copy_to_user(retinfo, &tmp, sizeof(tmp)) ? -EFAULT : 0; 1236 return copy_to_user(retinfo, &tmp, sizeof(tmp)) ? -EFAULT : 0;
1237} 1237}
1238 1238
1239static int rc_ioctl(struct tty_struct *tty, struct file *filp, 1239static int rc_ioctl(struct tty_struct *tty,
1240 unsigned int cmd, unsigned long arg) 1240 unsigned int cmd, unsigned long arg)
1241{ 1241{
1242 struct riscom_port *port = tty->driver_data; 1242 struct riscom_port *port = tty->driver_data;
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 36c108811a81..3780da8ad12d 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1326,7 +1326,7 @@ static int get_version(struct r_port *info, struct rocket_version __user *retver
1326} 1326}
1327 1327
1328/* IOCTL call handler into the driver */ 1328/* IOCTL call handler into the driver */
1329static int rp_ioctl(struct tty_struct *tty, struct file *file, 1329static int rp_ioctl(struct tty_struct *tty,
1330 unsigned int cmd, unsigned long arg) 1330 unsigned int cmd, unsigned long arg)
1331{ 1331{
1332 struct r_port *info = tty->driver_data; 1332 struct r_port *info = tty->driver_data;
diff --git a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c
index 9610861d1f5f..3f47c2ead8e5 100644
--- a/drivers/char/ser_a2232.c
+++ b/drivers/char/ser_a2232.c
@@ -133,8 +133,8 @@ static void a2232_hungup(void *ptr);
133/* END GENERIC_SERIAL PROTOTYPES */ 133/* END GENERIC_SERIAL PROTOTYPES */
134 134
135/* Functions that the TTY driver struct expects */ 135/* Functions that the TTY driver struct expects */
136static int a2232_ioctl(struct tty_struct *tty, struct file *file, 136static int a2232_ioctl(struct tty_struct *tty,
137 unsigned int cmd, unsigned long arg); 137 unsigned int cmd, unsigned long arg);
138static void a2232_throttle(struct tty_struct *tty); 138static void a2232_throttle(struct tty_struct *tty);
139static void a2232_unthrottle(struct tty_struct *tty); 139static void a2232_unthrottle(struct tty_struct *tty);
140static int a2232_open(struct tty_struct * tty, struct file * filp); 140static int a2232_open(struct tty_struct * tty, struct file * filp);
@@ -447,7 +447,7 @@ static void a2232_hungup(void *ptr)
447/*** END OF REAL_DRIVER FUNCTIONS ***/ 447/*** END OF REAL_DRIVER FUNCTIONS ***/
448 448
449/*** BEGIN FUNCTIONS EXPECTED BY TTY DRIVER STRUCTS ***/ 449/*** BEGIN FUNCTIONS EXPECTED BY TTY DRIVER STRUCTS ***/
450static int a2232_ioctl( struct tty_struct *tty, struct file *file, 450static int a2232_ioctl( struct tty_struct *tty,
451 unsigned int cmd, unsigned long arg) 451 unsigned int cmd, unsigned long arg)
452{ 452{
453 return -ENOIOCTLCMD; 453 return -ENOIOCTLCMD;
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 89ac542ffff2..674af6933978 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -1492,7 +1492,7 @@ get_default_timeout(struct cyclades_port *info, unsigned long __user * value)
1492} 1492}
1493 1493
1494static int 1494static int
1495cy_ioctl(struct tty_struct *tty, struct file *file, 1495cy_ioctl(struct tty_struct *tty,
1496 unsigned int cmd, unsigned long arg) 1496 unsigned int cmd, unsigned long arg)
1497{ 1497{
1498 struct cyclades_port *info = tty->driver_data; 1498 struct cyclades_port *info = tty->driver_data;
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index a6b23847e4a7..47e5753f732a 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -1928,7 +1928,7 @@ static int sx_get_serial_info(struct specialix_port *port,
1928} 1928}
1929 1929
1930 1930
1931static int sx_ioctl(struct tty_struct *tty, struct file *filp, 1931static int sx_ioctl(struct tty_struct *tty,
1932 unsigned int cmd, unsigned long arg) 1932 unsigned int cmd, unsigned long arg)
1933{ 1933{
1934 struct specialix_port *port = tty->driver_data; 1934 struct specialix_port *port = tty->driver_data;
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index c42dbffbed16..4fff5cd3b163 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -1132,14 +1132,13 @@ static int stl_tiocmset(struct tty_struct *tty,
1132 return 0; 1132 return 0;
1133} 1133}
1134 1134
1135static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) 1135static int stl_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
1136{ 1136{
1137 struct stlport *portp; 1137 struct stlport *portp;
1138 int rc; 1138 int rc;
1139 void __user *argp = (void __user *)arg; 1139 void __user *argp = (void __user *)arg;
1140 1140
1141 pr_debug("stl_ioctl(tty=%p,file=%p,cmd=%x,arg=%lx)\n", tty, file, cmd, 1141 pr_debug("stl_ioctl(tty=%p,cmd=%x,arg=%lx)\n", tty, cmd, arg);
1142 arg);
1143 1142
1144 portp = tty->driver_data; 1143 portp = tty->driver_data;
1145 if (portp == NULL) 1144 if (portp == NULL)
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index 342c6ae67da5..1291462bcddb 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1899,7 +1899,7 @@ static int sx_tiocmset(struct tty_struct *tty,
1899 return 0; 1899 return 0;
1900} 1900}
1901 1901
1902static int sx_ioctl(struct tty_struct *tty, struct file *filp, 1902static int sx_ioctl(struct tty_struct *tty,
1903 unsigned int cmd, unsigned long arg) 1903 unsigned int cmd, unsigned long arg)
1904{ 1904{
1905 int rc; 1905 int rc;
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 691e1094c20b..18888d005a0a 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -2962,13 +2962,12 @@ static int msgl_get_icount(struct tty_struct *tty,
2962 * Arguments: 2962 * Arguments:
2963 * 2963 *
2964 * tty pointer to tty instance data 2964 * tty pointer to tty instance data
2965 * file pointer to associated file object for device
2966 * cmd IOCTL command code 2965 * cmd IOCTL command code
2967 * arg command argument/context 2966 * arg command argument/context
2968 * 2967 *
2969 * Return Value: 0 if success, otherwise error code 2968 * Return Value: 0 if success, otherwise error code
2970 */ 2969 */
2971static int mgsl_ioctl(struct tty_struct *tty, struct file * file, 2970static int mgsl_ioctl(struct tty_struct *tty,
2972 unsigned int cmd, unsigned long arg) 2971 unsigned int cmd, unsigned long arg)
2973{ 2972{
2974 struct mgsl_struct * info = tty->driver_data; 2973 struct mgsl_struct * info = tty->driver_data;
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 04da6d61dc4f..a35dd549a008 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -154,7 +154,7 @@ static void flush_buffer(struct tty_struct *tty);
154static void tx_hold(struct tty_struct *tty); 154static void tx_hold(struct tty_struct *tty);
155static void tx_release(struct tty_struct *tty); 155static void tx_release(struct tty_struct *tty);
156 156
157static int ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); 157static int ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
158static int chars_in_buffer(struct tty_struct *tty); 158static int chars_in_buffer(struct tty_struct *tty);
159static void throttle(struct tty_struct * tty); 159static void throttle(struct tty_struct * tty);
160static void unthrottle(struct tty_struct * tty); 160static void unthrottle(struct tty_struct * tty);
@@ -1030,13 +1030,12 @@ static void tx_release(struct tty_struct *tty)
1030 * Arguments 1030 * Arguments
1031 * 1031 *
1032 * tty pointer to tty instance data 1032 * tty pointer to tty instance data
1033 * file pointer to associated file object for device
1034 * cmd IOCTL command code 1033 * cmd IOCTL command code
1035 * arg command argument/context 1034 * arg command argument/context
1036 * 1035 *
1037 * Return 0 if success, otherwise error code 1036 * Return 0 if success, otherwise error code
1038 */ 1037 */
1039static int ioctl(struct tty_struct *tty, struct file *file, 1038static int ioctl(struct tty_struct *tty,
1040 unsigned int cmd, unsigned long arg) 1039 unsigned int cmd, unsigned long arg)
1041{ 1040{
1042 struct slgt_info *info = tty->driver_data; 1041 struct slgt_info *info = tty->driver_data;
@@ -1200,7 +1199,7 @@ static long set_params32(struct slgt_info *info, struct MGSL_PARAMS32 __user *ne
1200 return 0; 1199 return 0;
1201} 1200}
1202 1201
1203static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file, 1202static long slgt_compat_ioctl(struct tty_struct *tty,
1204 unsigned int cmd, unsigned long arg) 1203 unsigned int cmd, unsigned long arg)
1205{ 1204{
1206 struct slgt_info *info = tty->driver_data; 1205 struct slgt_info *info = tty->driver_data;
@@ -1239,7 +1238,7 @@ static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file,
1239 case MGSL_IOCSIF: 1238 case MGSL_IOCSIF:
1240 case MGSL_IOCSXSYNC: 1239 case MGSL_IOCSXSYNC:
1241 case MGSL_IOCSXCTRL: 1240 case MGSL_IOCSXCTRL:
1242 rc = ioctl(tty, file, cmd, arg); 1241 rc = ioctl(tty, cmd, arg);
1243 break; 1242 break;
1244 } 1243 }
1245 1244
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 1f9de97e8cfc..327343694473 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -520,7 +520,7 @@ static void flush_buffer(struct tty_struct *tty);
520static void tx_hold(struct tty_struct *tty); 520static void tx_hold(struct tty_struct *tty);
521static void tx_release(struct tty_struct *tty); 521static void tx_release(struct tty_struct *tty);
522 522
523static int ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); 523static int ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
524static int chars_in_buffer(struct tty_struct *tty); 524static int chars_in_buffer(struct tty_struct *tty);
525static void throttle(struct tty_struct * tty); 525static void throttle(struct tty_struct * tty);
526static void unthrottle(struct tty_struct * tty); 526static void unthrottle(struct tty_struct * tty);
@@ -1248,13 +1248,12 @@ static void tx_release(struct tty_struct *tty)
1248 * Arguments: 1248 * Arguments:
1249 * 1249 *
1250 * tty pointer to tty instance data 1250 * tty pointer to tty instance data
1251 * file pointer to associated file object for device
1252 * cmd IOCTL command code 1251 * cmd IOCTL command code
1253 * arg command argument/context 1252 * arg command argument/context
1254 * 1253 *
1255 * Return Value: 0 if success, otherwise error code 1254 * Return Value: 0 if success, otherwise error code
1256 */ 1255 */
1257static int ioctl(struct tty_struct *tty, struct file *file, 1256static int ioctl(struct tty_struct *tty,
1258 unsigned int cmd, unsigned long arg) 1257 unsigned int cmd, unsigned long arg)
1259{ 1258{
1260 SLMP_INFO *info = tty->driver_data; 1259 SLMP_INFO *info = tty->driver_data;
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index c40c1612c8a7..a1f68af4ccf4 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -144,7 +144,7 @@ static int tpk_write_room(struct tty_struct *tty)
144/* 144/*
145 * TTY operations ioctl function. 145 * TTY operations ioctl function.
146 */ 146 */
147static int tpk_ioctl(struct tty_struct *tty, struct file *file, 147static int tpk_ioctl(struct tty_struct *tty,
148 unsigned int cmd, unsigned long arg) 148 unsigned int cmd, unsigned long arg)
149{ 149{
150 struct ttyprintk_port *tpkp = tty->driver_data; 150 struct ttyprintk_port *tpkp = tty->driver_data;
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c
index 12de1202d22c..96838640f575 100644
--- a/drivers/char/vme_scc.c
+++ b/drivers/char/vme_scc.c
@@ -75,7 +75,7 @@ static void scc_hungup(void *ptr);
75static void scc_close(void *ptr); 75static void scc_close(void *ptr);
76static int scc_chars_in_buffer(void * ptr); 76static int scc_chars_in_buffer(void * ptr);
77static int scc_open(struct tty_struct * tty, struct file * filp); 77static int scc_open(struct tty_struct * tty, struct file * filp);
78static int scc_ioctl(struct tty_struct * tty, struct file * filp, 78static int scc_ioctl(struct tty_struct * tty,
79 unsigned int cmd, unsigned long arg); 79 unsigned int cmd, unsigned long arg);
80static void scc_throttle(struct tty_struct *tty); 80static void scc_throttle(struct tty_struct *tty);
81static void scc_unthrottle(struct tty_struct *tty); 81static void scc_unthrottle(struct tty_struct *tty);
@@ -1046,7 +1046,7 @@ static void scc_unthrottle (struct tty_struct * tty)
1046} 1046}
1047 1047
1048 1048
1049static int scc_ioctl(struct tty_struct *tty, struct file *file, 1049static int scc_ioctl(struct tty_struct *tty,
1050 unsigned int cmd, unsigned long arg) 1050 unsigned int cmd, unsigned long arg)
1051{ 1051{
1052 return -ENOIOCTLCMD; 1052 return -ENOIOCTLCMD;
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index f80a7c48a35f..0d7088367038 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1219,16 +1219,10 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
1219 return mp->outbytes; 1219 return mp->outbytes;
1220} 1220}
1221 1221
1222static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file, 1222static int capinc_tty_ioctl(struct tty_struct *tty,
1223 unsigned int cmd, unsigned long arg) 1223 unsigned int cmd, unsigned long arg)
1224{ 1224{
1225 int error = 0; 1225 return -ENOIOCTLCMD;
1226 switch (cmd) {
1227 default:
1228 error = n_tty_ioctl_helper(tty, file, cmd, arg);
1229 break;
1230 }
1231 return error;
1232} 1226}
1233 1227
1234static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old) 1228static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 9b2bb491c614..59de638225fe 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -115,7 +115,7 @@ static int if_config(struct cardstate *cs, int *arg)
115 115
116static int if_open(struct tty_struct *tty, struct file *filp); 116static int if_open(struct tty_struct *tty, struct file *filp);
117static void if_close(struct tty_struct *tty, struct file *filp); 117static void if_close(struct tty_struct *tty, struct file *filp);
118static int if_ioctl(struct tty_struct *tty, struct file *file, 118static int if_ioctl(struct tty_struct *tty,
119 unsigned int cmd, unsigned long arg); 119 unsigned int cmd, unsigned long arg);
120static int if_write_room(struct tty_struct *tty); 120static int if_write_room(struct tty_struct *tty);
121static int if_chars_in_buffer(struct tty_struct *tty); 121static int if_chars_in_buffer(struct tty_struct *tty);
@@ -205,7 +205,7 @@ static void if_close(struct tty_struct *tty, struct file *filp)
205 module_put(cs->driver->owner); 205 module_put(cs->driver->owner);
206} 206}
207 207
208static int if_ioctl(struct tty_struct *tty, struct file *file, 208static int if_ioctl(struct tty_struct *tty,
209 unsigned int cmd, unsigned long arg) 209 unsigned int cmd, unsigned long arg)
210{ 210{
211 struct cardstate *cs; 211 struct cardstate *cs;
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 0341c69eb152..3d88f15aa218 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1413,8 +1413,7 @@ isdn_tty_tiocmset(struct tty_struct *tty,
1413} 1413}
1414 1414
1415static int 1415static int
1416isdn_tty_ioctl(struct tty_struct *tty, struct file *file, 1416isdn_tty_ioctl(struct tty_struct *tty, uint cmd, ulong arg)
1417 uint cmd, ulong arg)
1418{ 1417{
1419 modem_info *info = (modem_info *) tty->driver_data; 1418 modem_info *info = (modem_info *) tty->driver_data;
1420 int retval; 1419 int retval;
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 956e1d6e72a5..2ad58a0377b7 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1730,7 +1730,7 @@ static int hso_serial_tiocmset(struct tty_struct *tty,
1730 USB_CTRL_SET_TIMEOUT); 1730 USB_CTRL_SET_TIMEOUT);
1731} 1731}
1732 1732
1733static int hso_serial_ioctl(struct tty_struct *tty, struct file *file, 1733static int hso_serial_ioctl(struct tty_struct *tty,
1734 unsigned int cmd, unsigned long arg) 1734 unsigned int cmd, unsigned long arg)
1735{ 1735{
1736 struct hso_serial *serial = get_serial_by_tty(tty); 1736 struct hso_serial *serial = get_serial_by_tty(tty);
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 88477d16b8b7..50f3ffd610b7 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2671,7 +2671,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty,
2671} 2671}
2672 2672
2673 2673
2674static int gsmtty_ioctl(struct tty_struct *tty, struct file *filp, 2674static int gsmtty_ioctl(struct tty_struct *tty,
2675 unsigned int cmd, unsigned long arg) 2675 unsigned int cmd, unsigned long arg)
2676{ 2676{
2677 return -ENOIOCTLCMD; 2677 return -ENOIOCTLCMD;
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 923a48585501..c88029af84dd 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -334,7 +334,7 @@ free_mem_out:
334 return -ENOMEM; 334 return -ENOMEM;
335} 335}
336 336
337static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, 337static int pty_bsd_ioctl(struct tty_struct *tty,
338 unsigned int cmd, unsigned long arg) 338 unsigned int cmd, unsigned long arg)
339{ 339{
340 switch (cmd) { 340 switch (cmd) {
@@ -489,7 +489,7 @@ static struct ctl_table pty_root_table[] = {
489}; 489};
490 490
491 491
492static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, 492static int pty_unix98_ioctl(struct tty_struct *tty,
493 unsigned int cmd, unsigned long arg) 493 unsigned int cmd, unsigned long arg)
494{ 494{
495 switch (cmd) { 495 switch (cmd) {
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index a9d99856c892..1de0e8d4bde1 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -945,7 +945,7 @@ static void send_break(struct m68k_serial * info, unsigned int duration)
945 local_irq_restore(flags); 945 local_irq_restore(flags);
946} 946}
947 947
948static int rs_ioctl(struct tty_struct *tty, struct file * file, 948static int rs_ioctl(struct tty_struct *tty,
949 unsigned int cmd, unsigned long arg) 949 unsigned int cmd, unsigned long arg)
950{ 950{
951 int error; 951 int error;
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c
index 217fe1c299e0..514a356d8d64 100644
--- a/drivers/tty/serial/68360serial.c
+++ b/drivers/tty/serial/68360serial.c
@@ -1405,7 +1405,7 @@ static int rs_360_get_icount(struct tty_struct *tty,
1405 return 0; 1405 return 0;
1406} 1406}
1407 1407
1408static int rs_360_ioctl(struct tty_struct *tty, struct file * file, 1408static int rs_360_ioctl(struct tty_struct *tty,
1409 unsigned int cmd, unsigned long arg) 1409 unsigned int cmd, unsigned long arg)
1410{ 1410{
1411 int error; 1411 int error;
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index b9fcd0bda60c..225123b37f19 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -3647,7 +3647,7 @@ rs_tiocmget(struct tty_struct *tty)
3647 3647
3648 3648
3649static int 3649static int
3650rs_ioctl(struct tty_struct *tty, struct file * file, 3650rs_ioctl(struct tty_struct *tty,
3651 unsigned int cmd, unsigned long arg) 3651 unsigned int cmd, unsigned long arg)
3652{ 3652{
3653 struct e100_serial * info = (struct e100_serial *)tty->driver_data; 3653 struct e100_serial * info = (struct e100_serial *)tty->driver_data;
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 623d6bd911d7..733fe8e73f0f 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1099,7 +1099,7 @@ static int uart_get_icount(struct tty_struct *tty,
1099 * Called via sys_ioctl. We can use spin_lock_irq() here. 1099 * Called via sys_ioctl. We can use spin_lock_irq() here.
1100 */ 1100 */
1101static int 1101static int
1102uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, 1102uart_ioctl(struct tty_struct *tty, unsigned int cmd,
1103 unsigned long arg) 1103 unsigned long arg)
1104{ 1104{
1105 struct uart_state *state = tty->driver_data; 1105 struct uart_state *state = tty->driver_data;
@@ -1152,7 +1152,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
1152 1152
1153 mutex_lock(&port->mutex); 1153 mutex_lock(&port->mutex);
1154 1154
1155 if (tty_hung_up_p(filp)) { 1155 if (tty->flags & (1 << TTY_IO_ERROR)) {
1156 ret = -EIO; 1156 ret = -EIO;
1157 goto out_up; 1157 goto out_up;
1158 } 1158 }
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 83af24ca1e5e..20a862a2a0c2 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2676,7 +2676,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2676 break; 2676 break;
2677 } 2677 }
2678 if (tty->ops->ioctl) { 2678 if (tty->ops->ioctl) {
2679 retval = (tty->ops->ioctl)(tty, file, cmd, arg); 2679 retval = (tty->ops->ioctl)(tty, cmd, arg);
2680 if (retval != -ENOIOCTLCMD) 2680 if (retval != -ENOIOCTLCMD)
2681 return retval; 2681 return retval;
2682 } 2682 }
@@ -2704,7 +2704,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
2704 return -EINVAL; 2704 return -EINVAL;
2705 2705
2706 if (tty->ops->compat_ioctl) { 2706 if (tty->ops->compat_ioctl) {
2707 retval = (tty->ops->compat_ioctl)(tty, file, cmd, arg); 2707 retval = (tty->ops->compat_ioctl)(tty, cmd, arg);
2708 if (retval != -ENOIOCTLCMD) 2708 if (retval != -ENOIOCTLCMD)
2709 return retval; 2709 return retval;
2710 } 2710 }
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 9e9a901442a3..b64804965316 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -495,7 +495,7 @@ do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_
495 * We handle the console-specific ioctl's here. We allow the 495 * We handle the console-specific ioctl's here. We allow the
496 * capability to modify any console, not just the fg_console. 496 * capability to modify any console, not just the fg_console.
497 */ 497 */
498int vt_ioctl(struct tty_struct *tty, struct file * file, 498int vt_ioctl(struct tty_struct *tty,
499 unsigned int cmd, unsigned long arg) 499 unsigned int cmd, unsigned long arg)
500{ 500{
501 struct vc_data *vc = tty->driver_data; 501 struct vc_data *vc = tty->driver_data;
@@ -1495,7 +1495,7 @@ compat_unimap_ioctl(unsigned int cmd, struct compat_unimapdesc __user *user_ud,
1495 return 0; 1495 return 0;
1496} 1496}
1497 1497
1498long vt_compat_ioctl(struct tty_struct *tty, struct file * file, 1498long vt_compat_ioctl(struct tty_struct *tty,
1499 unsigned int cmd, unsigned long arg) 1499 unsigned int cmd, unsigned long arg)
1500{ 1500{
1501 struct vc_data *vc = tty->driver_data; 1501 struct vc_data *vc = tty->driver_data;
@@ -1581,7 +1581,7 @@ out:
1581 1581
1582fallback: 1582fallback:
1583 tty_unlock(); 1583 tty_unlock();
1584 return vt_ioctl(tty, file, cmd, arg); 1584 return vt_ioctl(tty, cmd, arg);
1585} 1585}
1586 1586
1587 1587
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e9a26fbd079c..8d994a8bdc90 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -813,7 +813,7 @@ static int acm_tty_tiocmset(struct tty_struct *tty,
813 return acm_set_control(acm, acm->ctrlout = newctrl); 813 return acm_set_control(acm, acm->ctrlout = newctrl);
814} 814}
815 815
816static int acm_tty_ioctl(struct tty_struct *tty, struct file *file, 816static int acm_tty_ioctl(struct tty_struct *tty,
817 unsigned int cmd, unsigned long arg) 817 unsigned int cmd, unsigned long arg)
818{ 818{
819 struct acm *acm = tty->driver_data; 819 struct acm *acm = tty->driver_data;
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index b1110e136c33..a72575349744 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -406,7 +406,7 @@ static void serial_unthrottle(struct tty_struct *tty)
406 port->serial->type->unthrottle(tty); 406 port->serial->type->unthrottle(tty);
407} 407}
408 408
409static int serial_ioctl(struct tty_struct *tty, struct file *file, 409static int serial_ioctl(struct tty_struct *tty,
410 unsigned int cmd, unsigned long arg) 410 unsigned int cmd, unsigned long arg)
411{ 411{
412 struct usb_serial_port *port = tty->driver_data; 412 struct usb_serial_port *port = tty->driver_data;
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 54e4eaaa0561..483df15146d2 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -584,7 +584,7 @@ extern int pcxe_open(struct tty_struct *tty, struct file *filp);
584 584
585/* vt.c */ 585/* vt.c */
586 586
587extern int vt_ioctl(struct tty_struct *tty, struct file *file, 587extern int vt_ioctl(struct tty_struct *tty,
588 unsigned int cmd, unsigned long arg); 588 unsigned int cmd, unsigned long arg);
589 589
590extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file, 590extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 5dabaa2e6da3..9deeac855240 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -98,8 +98,7 @@
98 * 98 *
99 * Note: Do not call this function directly, call tty_write_room 99 * Note: Do not call this function directly, call tty_write_room
100 * 100 *
101 * int (*ioctl)(struct tty_struct *tty, struct file * file, 101 * int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
102 * unsigned int cmd, unsigned long arg);
103 * 102 *
104 * This routine allows the tty driver to implement 103 * This routine allows the tty driver to implement
105 * device-specific ioctls. If the ioctl number passed in cmd 104 * device-specific ioctls. If the ioctl number passed in cmd
@@ -107,7 +106,7 @@
107 * 106 *
108 * Optional 107 * Optional
109 * 108 *
110 * long (*compat_ioctl)(struct tty_struct *tty, struct file * file, 109 * long (*compat_ioctl)(struct tty_struct *tty,,
111 * unsigned int cmd, unsigned long arg); 110 * unsigned int cmd, unsigned long arg);
112 * 111 *
113 * implement ioctl processing for 32 bit process on 64 bit system 112 * implement ioctl processing for 32 bit process on 64 bit system
@@ -256,9 +255,9 @@ struct tty_operations {
256 void (*flush_chars)(struct tty_struct *tty); 255 void (*flush_chars)(struct tty_struct *tty);
257 int (*write_room)(struct tty_struct *tty); 256 int (*write_room)(struct tty_struct *tty);
258 int (*chars_in_buffer)(struct tty_struct *tty); 257 int (*chars_in_buffer)(struct tty_struct *tty);
259 int (*ioctl)(struct tty_struct *tty, struct file * file, 258 int (*ioctl)(struct tty_struct *tty,
260 unsigned int cmd, unsigned long arg); 259 unsigned int cmd, unsigned long arg);
261 long (*compat_ioctl)(struct tty_struct *tty, struct file * file, 260 long (*compat_ioctl)(struct tty_struct *tty,
262 unsigned int cmd, unsigned long arg); 261 unsigned int cmd, unsigned long arg);
263 void (*set_termios)(struct tty_struct *tty, struct ktermios * old); 262 void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
264 void (*throttle)(struct tty_struct * tty); 263 void (*throttle)(struct tty_struct * tty);
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 980ccb66e1b4..59ba38bc400f 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -123,7 +123,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self);
123extern int ircomm_tty_tiocmget(struct tty_struct *tty); 123extern int ircomm_tty_tiocmget(struct tty_struct *tty);
124extern int ircomm_tty_tiocmset(struct tty_struct *tty, 124extern int ircomm_tty_tiocmset(struct tty_struct *tty,
125 unsigned int set, unsigned int clear); 125 unsigned int set, unsigned int clear);
126extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, 126extern int ircomm_tty_ioctl(struct tty_struct *tty,
127 unsigned int cmd, unsigned long arg); 127 unsigned int cmd, unsigned long arg);
128extern void ircomm_tty_set_termios(struct tty_struct *tty, 128extern void ircomm_tty_set_termios(struct tty_struct *tty,
129 struct ktermios *old_termios); 129 struct ktermios *old_termios);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 8e78e7447726..b1805ff95415 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -830,7 +830,7 @@ static int rfcomm_tty_write_room(struct tty_struct *tty)
830 return room; 830 return room;
831} 831}
832 832
833static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) 833static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
834{ 834{
835 BT_DBG("tty %p cmd 0x%02x", tty, cmd); 835 BT_DBG("tty %p cmd 0x%02x", tty, cmd);
836 836
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index 5e0e718c930a..77c5e6499f8f 100644
--- a/net/irda/ircomm/ircomm_tty_ioctl.c
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c
@@ -365,12 +365,12 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
365} 365}
366 366
367/* 367/*
368 * Function ircomm_tty_ioctl (tty, file, cmd, arg) 368 * Function ircomm_tty_ioctl (tty, cmd, arg)
369 * 369 *
370 * 370 *
371 * 371 *
372 */ 372 */
373int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, 373int ircomm_tty_ioctl(struct tty_struct *tty,
374 unsigned int cmd, unsigned long arg) 374 unsigned int cmd, unsigned long arg)
375{ 375{
376 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 376 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;