提交 a509a7e4 编写于 作者: A Alan Cox 提交者: Live-CD User

tty: USB does not need the filp argument in the drivers

And indeed none of them use it. Clean this up as it will make moving to a
standard open method rather easier.
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d3b5cffc
......@@ -318,8 +318,7 @@ static void ark3116_set_termios(struct tty_struct *tty,
return;
}
static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct ktermios tmp_termios;
struct usb_serial *serial = port->serial;
......@@ -334,7 +333,7 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port,
return -ENOMEM;
}
result = usb_serial_generic_open(tty, port, filp);
result = usb_serial_generic_open(tty, port);
if (result)
goto err_out;
......
......@@ -92,7 +92,7 @@ static int debug;
static int belkin_sa_startup(struct usb_serial *serial);
static void belkin_sa_release(struct usb_serial *serial);
static int belkin_sa_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
struct usb_serial_port *port);
static void belkin_sa_close(struct usb_serial_port *port);
static void belkin_sa_read_int_callback(struct urb *urb);
static void belkin_sa_set_termios(struct tty_struct *tty,
......@@ -213,7 +213,7 @@ static void belkin_sa_release(struct usb_serial *serial)
static int belkin_sa_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
struct usb_serial_port *port)
{
int retval = 0;
......
......@@ -300,8 +300,7 @@ static void ch341_close(struct usb_serial_port *port)
/* open this device, set default parameters */
static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct ch341_private *priv = usb_get_serial_port_data(serial->port[0]);
......@@ -333,7 +332,7 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port,
return -EPROTO;
}
r = usb_serial_generic_open(tty, port, filp);
r = usb_serial_generic_open(tty, port);
out: return r;
}
......
......@@ -150,9 +150,9 @@ static int usb_console_setup(struct console *co, char *options)
/* only call the device specific open if this
* is the first time the port is opened */
if (serial->type->open)
retval = serial->type->open(NULL, port, NULL);
retval = serial->type->open(NULL, port);
else
retval = usb_serial_generic_open(NULL, port, NULL);
retval = usb_serial_generic_open(NULL, port);
if (retval) {
err("could not open USB console port");
......
......@@ -33,8 +33,7 @@
/*
* Function Prototypes
*/
static int cp210x_open(struct tty_struct *, struct usb_serial_port *,
struct file *);
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
static void cp210x_cleanup(struct usb_serial_port *);
static void cp210x_close(struct usb_serial_port *);
static void cp210x_get_termios(struct tty_struct *,
......@@ -368,8 +367,7 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
return baud;
}
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
int result;
......
......@@ -61,7 +61,7 @@ static int cyberjack_startup(struct usb_serial *serial);
static void cyberjack_disconnect(struct usb_serial *serial);
static void cyberjack_release(struct usb_serial *serial);
static int cyberjack_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
struct usb_serial_port *port);
static void cyberjack_close(struct usb_serial_port *port);
static int cyberjack_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count);
......@@ -173,7 +173,7 @@ static void cyberjack_release(struct usb_serial *serial)
}
static int cyberjack_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
struct usb_serial_port *port)
{
struct cyberjack_private *priv;
unsigned long flags;
......
......@@ -172,8 +172,7 @@ static int cypress_earthmate_startup(struct usb_serial *serial);
static int cypress_hidcom_startup(struct usb_serial *serial);
static int cypress_ca42v2_startup(struct usb_serial *serial);
static void cypress_release(struct usb_serial *serial);
static int cypress_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port);
static void cypress_close(struct usb_serial_port *port);
static void cypress_dtr_rts(struct usb_serial_port *port, int on);
static int cypress_write(struct tty_struct *tty, struct usb_serial_port *port,
......@@ -633,8 +632,7 @@ static void cypress_release(struct usb_serial *serial)
}
static int cypress_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
......
......@@ -453,8 +453,7 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port,
static void digi_write_bulk_callback(struct urb *urb);
static int digi_write_room(struct tty_struct *tty);
static int digi_chars_in_buffer(struct tty_struct *tty);
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port);
static void digi_close(struct usb_serial_port *port);
static int digi_carrier_raised(struct usb_serial_port *port);
static void digi_dtr_rts(struct usb_serial_port *port, int on);
......@@ -1347,8 +1346,7 @@ static int digi_carrier_raised(struct usb_serial_port *port)
return 0;
}
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port)
{
int ret;
unsigned char buf[32];
......
......@@ -79,8 +79,7 @@ static int debug;
#define EMPEG_PRODUCT_ID 0x0001
/* function prototypes for an empeg-car player */
static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port);
static void empeg_close(struct usb_serial_port *port);
static int empeg_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf,
......@@ -142,8 +141,7 @@ static int bytes_out;
/******************************************************************************
* Empeg specific driver functions
******************************************************************************/
static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int empeg_open(struct tty_struct *tty,struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
int result = 0;
......@@ -151,7 +149,7 @@ static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
dbg("%s - port %d", __func__, port->number);
/* Force default termio settings */
empeg_set_termios(tty, port, NULL) ;
empeg_set_termios(tty, port, NULL);
bytes_in = 0;
bytes_out = 0;
......
......@@ -747,8 +747,7 @@ static int ftdi_sio_probe(struct usb_serial *serial,
const struct usb_device_id *id);
static int ftdi_sio_port_probe(struct usb_serial_port *port);
static int ftdi_sio_port_remove(struct usb_serial_port *port);
static int ftdi_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port);
static void ftdi_close(struct usb_serial_port *port);
static void ftdi_dtr_rts(struct usb_serial_port *port, int on);
static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port,
......@@ -1680,8 +1679,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
return 0;
}
static int ftdi_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
{ /* ftdi_open */
struct usb_device *dev = port->serial->dev;
struct ftdi_private *priv = usb_get_serial_port_data(port);
......
......@@ -933,8 +933,7 @@ static int garmin_init_session(struct usb_serial_port *port)
static int garmin_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port)
{
unsigned long flags;
int status = 0;
......
......@@ -114,8 +114,7 @@ void usb_serial_generic_deregister(void)
#endif
}
int usb_serial_generic_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
int result = 0;
......
......@@ -205,8 +205,7 @@ static void edge_bulk_out_data_callback(struct urb *urb);
static void edge_bulk_out_cmd_callback(struct urb *urb);
/* function prototypes for the usbserial callbacks */
static int edge_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int edge_open(struct tty_struct *tty, struct usb_serial_port *port);
static void edge_close(struct usb_serial_port *port);
static int edge_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
......@@ -852,8 +851,7 @@ static void edge_bulk_out_cmd_callback(struct urb *urb)
* If successful, we return 0
* Otherwise we return a negative error number.
*****************************************************************************/
static int edge_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct usb_serial *serial;
......
......@@ -1831,8 +1831,7 @@ static void edge_bulk_out_callback(struct urb *urb)
tty_kref_put(tty);
}
static int edge_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct edgeport_serial *edge_serial;
......
......@@ -75,7 +75,7 @@ static int initial_wait;
/* Function prototypes for an ipaq */
static int ipaq_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
struct usb_serial_port *port);
static void ipaq_close(struct usb_serial_port *port);
static int ipaq_calc_num_ports(struct usb_serial *serial);
static int ipaq_startup(struct usb_serial *serial);
......@@ -587,7 +587,7 @@ static int bytes_in;
static int bytes_out;
static int ipaq_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct ipaq_private *priv;
......@@ -628,11 +628,6 @@ static int ipaq_open(struct tty_struct *tty,
priv->free_len += PACKET_SIZE;
}
if (tty) {
/* FIXME: These two are bogus */
tty->raw = 1;
tty->real_raw = 1;
}
/*
* Lose the small buffers usbserial provides. Make larger ones.
*/
......
......@@ -193,8 +193,7 @@ static void ipw_read_bulk_callback(struct urb *urb)
return;
}
static int ipw_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_device *dev = port->serial->dev;
u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT;
......
......@@ -86,8 +86,7 @@ static int buffer_size;
static int xbof = -1;
static int ir_startup (struct usb_serial *serial);
static int ir_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filep);
static int ir_open(struct tty_struct *tty, struct usb_serial_port *port);
static void ir_close(struct usb_serial_port *port);
static int ir_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
......@@ -296,8 +295,7 @@ static int ir_startup(struct usb_serial *serial)
return 0;
}
static int ir_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int ir_open(struct tty_struct *tty, struct usb_serial_port *port)
{
char *buffer;
int result = 0;
......
......@@ -1018,8 +1018,7 @@ static void iuu_close(struct usb_serial_port *port)
}
}
static int iuu_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
u8 *buf;
......@@ -1077,7 +1076,7 @@ static int iuu_open(struct tty_struct *tty,
tty->termios->c_iflag = 0;
priv->termios_initialized = 1;
priv->poll = 0;
}
}
spin_unlock_irqrestore(&priv->lock, flags);
/* initialize writebuf */
......
......@@ -1209,8 +1209,7 @@ static int keyspan_write_room(struct tty_struct *tty)
}
static int keyspan_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct keyspan_port_private *p_priv;
struct keyspan_serial_private *s_priv;
......
......@@ -36,8 +36,7 @@
/* Function prototypes for Keyspan serial converter */
static int keyspan_open (struct tty_struct *tty,
struct usb_serial_port *port,
struct file *filp);
struct usb_serial_port *port);
static void keyspan_close (struct usb_serial_port *port);
static void keyspan_dtr_rts (struct usb_serial_port *port, int on);
static int keyspan_startup (struct usb_serial *serial);
......
......@@ -681,7 +681,7 @@ static int keyspan_pda_carrier_raised(struct usb_serial_port *port)
static int keyspan_pda_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
unsigned char room;
......
......@@ -75,8 +75,7 @@ static int debug;
static int klsi_105_startup(struct usb_serial *serial);
static void klsi_105_disconnect(struct usb_serial *serial);
static void klsi_105_release(struct usb_serial *serial);
static int klsi_105_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port);
static void klsi_105_close(struct usb_serial_port *port);
static int klsi_105_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count);
......@@ -358,8 +357,7 @@ static void klsi_105_release(struct usb_serial *serial)
}
} /* klsi_105_release */
static int klsi_105_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct klsi_105_private *priv = usb_get_serial_port_data(port);
int retval = 0;
......@@ -371,10 +369,6 @@ static int klsi_105_open(struct tty_struct *tty,
dbg("%s port %d", __func__, port->number);
/* force low_latency on so that our tty_push actually forces
* the data through
* tty->low_latency = 1; */
/* Do a defined restart:
* Set up sane default baud rate and send the 'READ_ON'
* vendor command.
......
......@@ -70,8 +70,7 @@ static int debug;
/* Function prototypes */
static int kobil_startup(struct usb_serial *serial);
static void kobil_release(struct usb_serial *serial);
static int kobil_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port);
static void kobil_close(struct usb_serial_port *port);
static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
......@@ -211,8 +210,7 @@ static void kobil_release(struct usb_serial *serial)
}
static int kobil_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
{
int result = 0;
struct kobil_private *priv;
......
......@@ -93,8 +93,7 @@ static int debug;
*/
static int mct_u232_startup(struct usb_serial *serial);
static void mct_u232_release(struct usb_serial *serial);
static int mct_u232_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port);
static void mct_u232_close(struct usb_serial_port *port);
static void mct_u232_dtr_rts(struct usb_serial_port *port, int on);
static void mct_u232_read_int_callback(struct urb *urb);
......@@ -421,8 +420,7 @@ static void mct_u232_release(struct usb_serial *serial)
}
} /* mct_u232_release */
static int mct_u232_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv = usb_get_serial_port_data(port);
......
......@@ -319,8 +319,7 @@ static int send_mos_cmd(struct usb_serial *serial, __u8 request, __u16 value,
return status;
}
static int mos7720_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial;
struct usb_serial_port *port0;
......
......@@ -824,8 +824,7 @@ static int mos7840_serial_probe(struct usb_serial *serial,
* Otherwise we return a negative error number.
*****************************************************************************/
static int mos7840_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
{
int response;
int j;
......
......@@ -80,8 +80,7 @@ static void navman_read_int_callback(struct urb *urb)
__func__, result);
}
static int navman_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int navman_open(struct tty_struct *tty, struct usb_serial_port *port)
{
int result = 0;
......
......@@ -64,8 +64,7 @@ static int debug;
#define BT_IGNITIONPRO_ID 0x2000
/* function prototypes */
static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port);
static void omninet_close(struct usb_serial_port *port);
static void omninet_read_bulk_callback(struct urb *urb);
static void omninet_write_bulk_callback(struct urb *urb);
......@@ -163,8 +162,7 @@ static int omninet_attach(struct usb_serial *serial)
return 0;
}
static int omninet_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport;
......
......@@ -144,8 +144,7 @@ static void opticon_bulk_callback(struct urb *urb)
spin_unlock(&priv->lock);
}
static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct opticon_private *priv = usb_get_serial_data(port->serial);
unsigned long flags;
......
......@@ -45,8 +45,7 @@
/* Function prototypes */
static int option_probe(struct usb_serial *serial,
const struct usb_device_id *id);
static int option_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int option_open(struct tty_struct *tty, struct usb_serial_port *port);
static void option_close(struct usb_serial_port *port);
static void option_dtr_rts(struct usb_serial_port *port, int on);
......@@ -961,8 +960,7 @@ static int option_chars_in_buffer(struct tty_struct *tty)
return data_len;
}
static int option_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int option_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct option_port_private *portdata;
int i, err;
......
......@@ -141,8 +141,7 @@ struct oti6858_control_pkt {
&& ((a)->frame_fmt == (priv)->pending_setup.frame_fmt))
/* function prototypes */
static int oti6858_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port);
static void oti6858_close(struct usb_serial_port *port);
static void oti6858_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old);
......@@ -566,8 +565,7 @@ static void oti6858_set_termios(struct tty_struct *tty,
spin_unlock_irqrestore(&priv->lock, flags);
}
static int oti6858_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct oti6858_private *priv = usb_get_serial_port_data(port);
struct ktermios tmp_termios;
......
......@@ -691,8 +691,7 @@ static void pl2303_close(struct usb_serial_port *port)
}
static int pl2303_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct ktermios tmp_termios;
struct usb_serial *serial = port->serial;
......@@ -714,8 +713,6 @@ static int pl2303_open(struct tty_struct *tty,
if (tty)
pl2303_set_termios(tty, port, &tmp_termios);
/* FIXME: need to assert RTS and DTR if CRTSCTS off */
dbg("%s - submitting read urb", __func__);
port->read_urb->dev = serial->dev;
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
......
......@@ -734,8 +734,7 @@ static void sierra_close(struct usb_serial_port *port)
}
}
static int sierra_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct sierra_port_private *portdata;
struct usb_serial *serial = port->serial;
......
......@@ -623,8 +623,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
/* open the serial port. do some usb system call. set termios and get the line
* status of the device. then submit the read urb */
static int spcp8x5_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct ktermios tmp_termios;
struct usb_serial *serial = port->serial;
......@@ -658,8 +657,6 @@ static int spcp8x5_open(struct tty_struct *tty,
priv->line_status = status & 0xf0 ;
spin_unlock_irqrestore(&priv->lock, flags);
/* FIXME: need to assert RTS and DTR if CRTSCTS off */
dbg("%s - submitting read urb", __func__);
port->read_urb->dev = serial->dev;
ret = usb_submit_urb(port->read_urb, GFP_KERNEL);
......
......@@ -124,8 +124,7 @@ static void symbol_int_callback(struct urb *urb)
spin_unlock(&priv->lock);
}
static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct symbol_private *priv = usb_get_serial_data(port->serial);
unsigned long flags;
......
......@@ -98,8 +98,7 @@ struct ti_device {
static int ti_startup(struct usb_serial *serial);
static void ti_release(struct usb_serial *serial);
static int ti_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *file);
static int ti_open(struct tty_struct *tty, struct usb_serial_port *port);
static void ti_close(struct usb_serial_port *port);
static int ti_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *data, int count);
......@@ -492,8 +491,7 @@ static void ti_release(struct usb_serial *serial)
}
static int ti_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *file)
static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct ti_port *tport = usb_get_serial_port_data(port);
struct ti_device *tdev;
......
......@@ -244,7 +244,7 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
/* only call the device specific open if this
* is the first time the port is opened */
retval = serial->type->open(tty, port, filp);
retval = serial->type->open(tty, port);
if (retval)
goto bailout_interface_put;
mutex_unlock(&serial->disc_mutex);
......
......@@ -43,11 +43,10 @@ static struct usb_driver debug_driver = {
.no_dynamic_id = 1,
};
static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port)
{
port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
return usb_serial_generic_open(tty, port, filp);
return usb_serial_generic_open(tty, port);
}
/* This HW really does not support a serial break, so one will be
......
......@@ -36,8 +36,7 @@
#define DRIVER_DESC "USB HandSpring Visor / Palm OS driver"
/* function prototypes for a handspring visor */
static int visor_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static int visor_open(struct tty_struct *tty, struct usb_serial_port *port);
static void visor_close(struct usb_serial_port *port);
static int visor_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
......@@ -273,8 +272,7 @@ static int stats;
/******************************************************************************
* Handspring Visor specific driver functions
******************************************************************************/
static int visor_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
static int visor_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct visor_private *priv = usb_get_serial_port_data(port);
......
......@@ -146,7 +146,7 @@ static int whiteheat_firmware_attach(struct usb_serial *serial);
static int whiteheat_attach(struct usb_serial *serial);
static void whiteheat_release(struct usb_serial *serial);
static int whiteheat_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
struct usb_serial_port *port);
static void whiteheat_close(struct usb_serial_port *port);
static int whiteheat_write(struct tty_struct *tty,
struct usb_serial_port *port,
......@@ -659,8 +659,7 @@ static void whiteheat_release(struct usb_serial *serial)
return;
}
static int whiteheat_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
static int whiteheat_open(struct tty_struct *tty, struct usb_serial_port *port)
{
int retval = 0;
......
......@@ -238,9 +238,8 @@ struct usb_serial_driver {
int (*resume)(struct usb_serial *serial);
/* serial function calls */
/* Called by console with tty = NULL and by tty */
int (*open)(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
/* Called by console and by the tty layer */
int (*open)(struct tty_struct *tty, struct usb_serial_port *port);
void (*close)(struct usb_serial_port *port);
int (*write)(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
......@@ -300,7 +299,7 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
extern struct usb_serial *usb_serial_get_by_index(unsigned int minor);
extern void usb_serial_put(struct usb_serial *serial);
extern int usb_serial_generic_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
struct usb_serial_port *port);
extern int usb_serial_generic_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count);
extern void usb_serial_generic_close(struct usb_serial_port *port);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册