aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cp210x.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-13 16:25:09 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:46 -0400
commit12e7eca9630c0e00284e8a3995fc5eceaa0c199e (patch)
tree35b9771b3b29047cb2e44ae1fc812c83d31d7884 /drivers/usb/serial/cp210x.c
parent1ac93a30398774e084c12e25b3a74285ee4dba90 (diff)
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>
Diffstat (limited to 'drivers/usb/serial/cp210x.c')
-rw-r--r--drivers/usb/serial/cp210x.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index f95a590e1993..25e343ff61e7 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -34,7 +34,6 @@
34 * Function Prototypes 34 * Function Prototypes
35 */ 35 */
36static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *); 36static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
37static void cp210x_cleanup(struct usb_serial_port *);
38static void cp210x_close(struct usb_serial_port *); 37static void cp210x_close(struct usb_serial_port *);
39static void cp210x_get_termios(struct tty_struct *, 38static void cp210x_get_termios(struct tty_struct *,
40 struct usb_serial_port *port); 39 struct usb_serial_port *port);
@@ -49,7 +48,6 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *,
49 unsigned int, unsigned int); 48 unsigned int, unsigned int);
50static void cp210x_break_ctl(struct tty_struct *, int); 49static void cp210x_break_ctl(struct tty_struct *, int);
51static int cp210x_startup(struct usb_serial *); 50static int cp210x_startup(struct usb_serial *);
52static void cp210x_disconnect(struct usb_serial *);
53static void cp210x_dtr_rts(struct usb_serial_port *p, int on); 51static void cp210x_dtr_rts(struct usb_serial_port *p, int on);
54static int cp210x_carrier_raised(struct usb_serial_port *p); 52static int cp210x_carrier_raised(struct usb_serial_port *p);
55 53
@@ -147,7 +145,6 @@ static struct usb_serial_driver cp210x_device = {
147 .tiocmget = cp210x_tiocmget, 145 .tiocmget = cp210x_tiocmget,
148 .tiocmset = cp210x_tiocmset, 146 .tiocmset = cp210x_tiocmset,
149 .attach = cp210x_startup, 147 .attach = cp210x_startup,
150 .disconnect = cp210x_disconnect,
151 .dtr_rts = cp210x_dtr_rts, 148 .dtr_rts = cp210x_dtr_rts,
152 .carrier_raised = cp210x_carrier_raised 149 .carrier_raised = cp210x_carrier_raised
153}; 150};
@@ -391,21 +388,6 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
391 return 0; 388 return 0;
392} 389}
393 390
394static void cp210x_cleanup(struct usb_serial_port *port)
395{
396 struct usb_serial *serial = port->serial;
397
398 dbg("%s - port %d", __func__, port->number);
399
400 if (serial->dev) {
401 /* shutdown any bulk reads that might be going on */
402 if (serial->num_bulk_out)
403 usb_kill_urb(port->write_urb);
404 if (serial->num_bulk_in)
405 usb_kill_urb(port->read_urb);
406 }
407}
408
409static void cp210x_close(struct usb_serial_port *port) 391static void cp210x_close(struct usb_serial_port *port)
410{ 392{
411 dbg("%s - port %d", __func__, port->number); 393 dbg("%s - port %d", __func__, port->number);
@@ -794,17 +776,6 @@ static int cp210x_startup(struct usb_serial *serial)
794 return 0; 776 return 0;
795} 777}
796 778
797static void cp210x_disconnect(struct usb_serial *serial)
798{
799 int i;
800
801 dbg("%s", __func__);
802
803 /* Stop reads and writes on all ports */
804 for (i = 0; i < serial->num_ports; ++i)
805 cp210x_cleanup(serial->port[i]);
806}
807
808static int __init cp210x_init(void) 779static int __init cp210x_init(void)
809{ 780{
810 int retval; 781 int retval;