Commit 12e7eca9 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: cp210x: remove redundant disconnect()

Remove cp210x_disconnect which is used to kill traffic although this is
already handled by the generic framework.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ac93a30
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
* Function Prototypes * Function Prototypes
*/ */
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *); 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_close(struct usb_serial_port *);
static void cp210x_get_termios(struct tty_struct *, static void cp210x_get_termios(struct tty_struct *,
struct usb_serial_port *port); struct usb_serial_port *port);
...@@ -49,7 +48,6 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, ...@@ -49,7 +48,6 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *,
unsigned int, unsigned int); unsigned int, unsigned int);
static void cp210x_break_ctl(struct tty_struct *, int); static void cp210x_break_ctl(struct tty_struct *, int);
static int cp210x_startup(struct usb_serial *); static int cp210x_startup(struct usb_serial *);
static void cp210x_disconnect(struct usb_serial *);
static void cp210x_dtr_rts(struct usb_serial_port *p, int on); static void cp210x_dtr_rts(struct usb_serial_port *p, int on);
static int cp210x_carrier_raised(struct usb_serial_port *p); static int cp210x_carrier_raised(struct usb_serial_port *p);
...@@ -147,7 +145,6 @@ static struct usb_serial_driver cp210x_device = { ...@@ -147,7 +145,6 @@ static struct usb_serial_driver cp210x_device = {
.tiocmget = cp210x_tiocmget, .tiocmget = cp210x_tiocmget,
.tiocmset = cp210x_tiocmset, .tiocmset = cp210x_tiocmset,
.attach = cp210x_startup, .attach = cp210x_startup,
.disconnect = cp210x_disconnect,
.dtr_rts = cp210x_dtr_rts, .dtr_rts = cp210x_dtr_rts,
.carrier_raised = cp210x_carrier_raised .carrier_raised = cp210x_carrier_raised
}; };
...@@ -391,21 +388,6 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -391,21 +388,6 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
return 0; return 0;
} }
static void cp210x_cleanup(struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
dbg("%s - port %d", __func__, port->number);
if (serial->dev) {
/* shutdown any bulk reads that might be going on */
if (serial->num_bulk_out)
usb_kill_urb(port->write_urb);
if (serial->num_bulk_in)
usb_kill_urb(port->read_urb);
}
}
static void cp210x_close(struct usb_serial_port *port) static void cp210x_close(struct usb_serial_port *port)
{ {
dbg("%s - port %d", __func__, port->number); dbg("%s - port %d", __func__, port->number);
...@@ -794,17 +776,6 @@ static int cp210x_startup(struct usb_serial *serial) ...@@ -794,17 +776,6 @@ static int cp210x_startup(struct usb_serial *serial)
return 0; return 0;
} }
static void cp210x_disconnect(struct usb_serial *serial)
{
int i;
dbg("%s", __func__);
/* Stop reads and writes on all ports */
for (i = 0; i < serial->num_ports; ++i)
cp210x_cleanup(serial->port[i]);
}
static int __init cp210x_init(void) static int __init cp210x_init(void)
{ {
int retval; int retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment