Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a509a7e4 authored by Alan Cox's avatar Alan Cox Committed by Live-CD User
Browse files

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: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d3b5cffc
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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;

+2 −3
Original line number Diff line number Diff line
@@ -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;
}
+2 −2
Original line number Diff line number Diff line
@@ -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");
+2 −4
Original line number Diff line number Diff line
@@ -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;
Loading