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>
This commit is contained in:
Alan Cox
2011-02-14 16:27:22 +00:00
committed by Greg Kroah-Hartman
parent 00a0d0d65b
commit 6caa76b778
41 changed files with 66 additions and 78 deletions
+1 -1
View File
@@ -1293,7 +1293,7 @@ static int rs_get_icount(struct tty_struct *tty,
return 0;
}
static int rs_ioctl(struct tty_struct *tty, struct file * file,
static int rs_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct async_struct * info = tty->driver_data;
+1 -1
View File
@@ -2680,7 +2680,7 @@ static int cy_cflags_changed(struct cyclades_port *info, unsigned long arg,
* not recognized by the driver, it should return ENOIOCTLCMD.
*/
static int
cy_ioctl(struct tty_struct *tty, struct file *file,
cy_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct cyclades_port *info = tty->driver_data;
+4 -4
View File
@@ -175,9 +175,9 @@ static unsigned termios2digi_i(struct channel *ch, unsigned);
static unsigned termios2digi_c(struct channel *ch, unsigned);
static void epcaparam(struct tty_struct *, struct channel *);
static void receive_data(struct channel *, struct tty_struct *tty);
static int pc_ioctl(struct tty_struct *, struct file *,
static int pc_ioctl(struct tty_struct *,
unsigned int, unsigned long);
static int info_ioctl(struct tty_struct *, struct file *,
static int info_ioctl(struct tty_struct *,
unsigned int, unsigned long);
static void pc_set_termios(struct tty_struct *, struct ktermios *);
static void do_softint(struct work_struct *work);
@@ -1919,7 +1919,7 @@ static void receive_data(struct channel *ch, struct tty_struct *tty)
tty_schedule_flip(tty);
}
static int info_ioctl(struct tty_struct *tty, struct file *file,
static int info_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
switch (cmd) {
@@ -2057,7 +2057,7 @@ static int pc_tiocmset(struct tty_struct *tty,
return 0;
}
static int pc_ioctl(struct tty_struct *tty, struct file *file,
static int pc_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
digiflow_t dflow;
+2 -2
View File
@@ -173,7 +173,7 @@ static void ip2_flush_chars(PTTY);
static int ip2_write_room(PTTY);
static int ip2_chars_in_buf(PTTY);
static void ip2_flush_buffer(PTTY);
static int ip2_ioctl(PTTY, struct file *, UINT, ULONG);
static int ip2_ioctl(PTTY, UINT, ULONG);
static void ip2_set_termios(PTTY, struct ktermios *);
static void ip2_set_line_discipline(PTTY);
static void ip2_throttle(PTTY);
@@ -2127,7 +2127,7 @@ static int ip2_tiocmset(struct tty_struct *tty,
/* */
/******************************************************************************/
static int
ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
ip2_ioctl ( PTTY tty, UINT cmd, ULONG arg )
{
wait_queue_t wait;
i2ChanStrPtr pCh = DevTable[tty->index];
+1 -1
View File
@@ -1167,7 +1167,7 @@ static int isicom_get_serial_info(struct isi_port *port,
return 0;
}
static int isicom_ioctl(struct tty_struct *tty, struct file *filp,
static int isicom_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct isi_port *port = tty->driver_data;
+2 -2
View File
@@ -603,7 +603,7 @@ static int stli_putchar(struct tty_struct *tty, unsigned char ch);
static void stli_flushchars(struct tty_struct *tty);
static int stli_writeroom(struct tty_struct *tty);
static int stli_charsinbuffer(struct tty_struct *tty);
static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
static int stli_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
static void stli_settermios(struct tty_struct *tty, struct ktermios *old);
static void stli_throttle(struct tty_struct *tty);
static void stli_unthrottle(struct tty_struct *tty);
@@ -1556,7 +1556,7 @@ static int stli_tiocmset(struct tty_struct *tty,
sizeof(asysigs_t), 0);
}
static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
static int stli_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
{
struct stliport *portp;
struct stlibrd *brdp;
+1 -1
View File
@@ -287,7 +287,7 @@ static void moxa_low_water_check(void __iomem *ofsAddr)
* TTY operations
*/
static int moxa_ioctl(struct tty_struct *tty, struct file *file,
static int moxa_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct moxa_port *ch = tty->driver_data;
+1 -1
View File
@@ -1655,7 +1655,7 @@ static int mxser_cflags_changed(struct mxser_port *info, unsigned long arg,
return ret;
}
static int mxser_ioctl(struct tty_struct *tty, struct file *file,
static int mxser_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct mxser_port *info = tty->driver_data;
+1 -1
View File
@@ -1824,7 +1824,7 @@ static int ntty_tiocgicount(struct tty_struct *tty,
return 0;
}
static int ntty_ioctl(struct tty_struct *tty, struct file *file,
static int ntty_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct port *port = tty->driver_data;
+2 -2
View File
@@ -425,7 +425,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,
return set_control_lines(tty, set, clear);
}
static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
static int ipw_ioctl(struct tty_struct *linux_tty,
unsigned int cmd, unsigned long arg)
{
struct ipw_tty *tty = linux_tty->driver_data;
@@ -484,7 +484,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
return tty_perform_flush(linux_tty, arg);
}
}
return tty_mode_ioctl(linux_tty, file, cmd , arg);
return -ENOIOCTLCMD;
}
static int add_tty(int j,
+1 -1
View File
@@ -1236,7 +1236,7 @@ static int rc_get_serial_info(struct riscom_port *port,
return copy_to_user(retinfo, &tmp, sizeof(tmp)) ? -EFAULT : 0;
}
static int rc_ioctl(struct tty_struct *tty, struct file *filp,
static int rc_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct riscom_port *port = tty->driver_data;
+1 -1
View File
@@ -1326,7 +1326,7 @@ static int get_version(struct r_port *info, struct rocket_version __user *retver
}
/* IOCTL call handler into the driver */
static int rp_ioctl(struct tty_struct *tty, struct file *file,
static int rp_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct r_port *info = tty->driver_data;
+3 -3
View File
@@ -133,8 +133,8 @@ static void a2232_hungup(void *ptr);
/* END GENERIC_SERIAL PROTOTYPES */
/* Functions that the TTY driver struct expects */
static int a2232_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg);
static int a2232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg);
static void a2232_throttle(struct tty_struct *tty);
static void a2232_unthrottle(struct tty_struct *tty);
static int a2232_open(struct tty_struct * tty, struct file * filp);
@@ -447,7 +447,7 @@ static void a2232_hungup(void *ptr)
/*** END OF REAL_DRIVER FUNCTIONS ***/
/*** BEGIN FUNCTIONS EXPECTED BY TTY DRIVER STRUCTS ***/
static int a2232_ioctl( struct tty_struct *tty, struct file *file,
static int a2232_ioctl( struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
+1 -1
View File
@@ -1492,7 +1492,7 @@ get_default_timeout(struct cyclades_port *info, unsigned long __user * value)
}
static int
cy_ioctl(struct tty_struct *tty, struct file *file,
cy_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct cyclades_port *info = tty->driver_data;
+1 -1
View File
@@ -1928,7 +1928,7 @@ static int sx_get_serial_info(struct specialix_port *port,
}
static int sx_ioctl(struct tty_struct *tty, struct file *filp,
static int sx_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct specialix_port *port = tty->driver_data;
+2 -3
View File
@@ -1132,14 +1132,13 @@ static int stl_tiocmset(struct tty_struct *tty,
return 0;
}
static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
static int stl_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
{
struct stlport *portp;
int rc;
void __user *argp = (void __user *)arg;
pr_debug("stl_ioctl(tty=%p,file=%p,cmd=%x,arg=%lx)\n", tty, file, cmd,
arg);
pr_debug("stl_ioctl(tty=%p,cmd=%x,arg=%lx)\n", tty, cmd, arg);
portp = tty->driver_data;
if (portp == NULL)
+1 -1
View File
@@ -1899,7 +1899,7 @@ static int sx_tiocmset(struct tty_struct *tty,
return 0;
}
static int sx_ioctl(struct tty_struct *tty, struct file *filp,
static int sx_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
int rc;
+1 -2
View File
@@ -2962,13 +2962,12 @@ static int msgl_get_icount(struct tty_struct *tty,
* Arguments:
*
* tty pointer to tty instance data
* file pointer to associated file object for device
* cmd IOCTL command code
* arg command argument/context
*
* Return Value: 0 if success, otherwise error code
*/
static int mgsl_ioctl(struct tty_struct *tty, struct file * file,
static int mgsl_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct mgsl_struct * info = tty->driver_data;
+4 -5
View File
@@ -154,7 +154,7 @@ static void flush_buffer(struct tty_struct *tty);
static void tx_hold(struct tty_struct *tty);
static void tx_release(struct tty_struct *tty);
static int ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
static int ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
static int chars_in_buffer(struct tty_struct *tty);
static void throttle(struct tty_struct * tty);
static void unthrottle(struct tty_struct * tty);
@@ -1030,13 +1030,12 @@ static void tx_release(struct tty_struct *tty)
* Arguments
*
* tty pointer to tty instance data
* file pointer to associated file object for device
* cmd IOCTL command code
* arg command argument/context
*
* Return 0 if success, otherwise error code
*/
static int ioctl(struct tty_struct *tty, struct file *file,
static int ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct slgt_info *info = tty->driver_data;
@@ -1200,7 +1199,7 @@ static long set_params32(struct slgt_info *info, struct MGSL_PARAMS32 __user *ne
return 0;
}
static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file,
static long slgt_compat_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct slgt_info *info = tty->driver_data;
@@ -1239,7 +1238,7 @@ static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file,
case MGSL_IOCSIF:
case MGSL_IOCSXSYNC:
case MGSL_IOCSXCTRL:
rc = ioctl(tty, file, cmd, arg);
rc = ioctl(tty, cmd, arg);
break;
}
+2 -3
View File
@@ -520,7 +520,7 @@ static void flush_buffer(struct tty_struct *tty);
static void tx_hold(struct tty_struct *tty);
static void tx_release(struct tty_struct *tty);
static int ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
static int ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
static int chars_in_buffer(struct tty_struct *tty);
static void throttle(struct tty_struct * tty);
static void unthrottle(struct tty_struct * tty);
@@ -1248,13 +1248,12 @@ static void tx_release(struct tty_struct *tty)
* Arguments:
*
* tty pointer to tty instance data
* file pointer to associated file object for device
* cmd IOCTL command code
* arg command argument/context
*
* Return Value: 0 if success, otherwise error code
*/
static int ioctl(struct tty_struct *tty, struct file *file,
static int ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
SLMP_INFO *info = tty->driver_data;

Some files were not shown because too many files have changed in this diff Show More