Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
12e7eca9 1ac93a30

-29
-29
drivers/usb/serial/cp210x.c
··· 34 34 * Function Prototypes 35 35 */ 36 36 static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *); 37 - static void cp210x_cleanup(struct usb_serial_port *); 38 37 static void cp210x_close(struct usb_serial_port *); 39 38 static void cp210x_get_termios(struct tty_struct *, 40 39 struct usb_serial_port *port); ··· 48 49 unsigned int, unsigned int); 49 50 static void cp210x_break_ctl(struct tty_struct *, int); 50 51 static int cp210x_startup(struct usb_serial *); 51 - static void cp210x_disconnect(struct usb_serial *); 52 52 static void cp210x_dtr_rts(struct usb_serial_port *p, int on); 53 53 static int cp210x_carrier_raised(struct usb_serial_port *p); 54 54 ··· 145 147 .tiocmget = cp210x_tiocmget, 146 148 .tiocmset = cp210x_tiocmset, 147 149 .attach = cp210x_startup, 148 - .disconnect = cp210x_disconnect, 149 150 .dtr_rts = cp210x_dtr_rts, 150 151 .carrier_raised = cp210x_carrier_raised 151 152 }; ··· 386 389 /* Configure the termios structure */ 387 390 cp210x_get_termios(tty, port); 388 391 return 0; 389 - } 390 - 391 - static void cp210x_cleanup(struct usb_serial_port *port) 392 - { 393 - struct usb_serial *serial = port->serial; 394 - 395 - dbg("%s - port %d", __func__, port->number); 396 - 397 - if (serial->dev) { 398 - /* shutdown any bulk reads that might be going on */ 399 - if (serial->num_bulk_out) 400 - usb_kill_urb(port->write_urb); 401 - if (serial->num_bulk_in) 402 - usb_kill_urb(port->read_urb); 403 - } 404 392 } 405 393 406 394 static void cp210x_close(struct usb_serial_port *port) ··· 774 792 /* cp210x buffers behave strangely unless device is reset */ 775 793 usb_reset_device(serial->dev); 776 794 return 0; 777 - } 778 - 779 - static void cp210x_disconnect(struct usb_serial *serial) 780 - { 781 - int i; 782 - 783 - dbg("%s", __func__); 784 - 785 - /* Stop reads and writes on all ports */ 786 - for (i = 0; i < serial->num_ports; ++i) 787 - cp210x_cleanup(serial->port[i]); 788 795 } 789 796 790 797 static int __init cp210x_init(void)