aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/oti6858.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/oti6858.c')
-rw-r--r--drivers/usb/serial/oti6858.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 5fdc33c6a3c0..5976b65ab6ee 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -66,13 +66,6 @@ static const struct usb_device_id id_table[] = {
66 66
67MODULE_DEVICE_TABLE(usb, id_table); 67MODULE_DEVICE_TABLE(usb, id_table);
68 68
69static struct usb_driver oti6858_driver = {
70 .name = "oti6858",
71 .probe = usb_serial_probe,
72 .disconnect = usb_serial_disconnect,
73 .id_table = id_table,
74};
75
76static bool debug; 69static bool debug;
77 70
78/* requests */ 71/* requests */
@@ -211,8 +204,6 @@ static void setup_line(struct work_struct *work)
211 unsigned long flags; 204 unsigned long flags;
212 int result; 205 int result;
213 206
214 dbg("%s(port = %d)", __func__, port->number);
215
216 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); 207 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
217 if (new_setup == NULL) { 208 if (new_setup == NULL) {
218 dev_err(&port->dev, "%s(): out of memory!\n", __func__); 209 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
@@ -282,8 +273,6 @@ static void send_data(struct work_struct *work)
282 unsigned long flags; 273 unsigned long flags;
283 u8 *allow; 274 u8 *allow;
284 275
285 dbg("%s(port = %d)", __func__, port->number);
286
287 spin_lock_irqsave(&priv->lock, flags); 276 spin_lock_irqsave(&priv->lock, flags);
288 if (priv->flags.write_urb_in_use) { 277 if (priv->flags.write_urb_in_use) {
289 spin_unlock_irqrestore(&priv->lock, flags); 278 spin_unlock_irqrestore(&priv->lock, flags);
@@ -379,8 +368,6 @@ static int oti6858_startup(struct usb_serial *serial)
379static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port, 368static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port,
380 const unsigned char *buf, int count) 369 const unsigned char *buf, int count)
381{ 370{
382 dbg("%s(port = %d, count = %d)", __func__, port->number, count);
383
384 if (!count) 371 if (!count)
385 return count; 372 return count;
386 373
@@ -395,8 +382,6 @@ static int oti6858_write_room(struct tty_struct *tty)
395 int room = 0; 382 int room = 0;
396 unsigned long flags; 383 unsigned long flags;
397 384
398 dbg("%s(port = %d)", __func__, port->number);
399
400 spin_lock_irqsave(&port->lock, flags); 385 spin_lock_irqsave(&port->lock, flags);
401 room = kfifo_avail(&port->write_fifo); 386 room = kfifo_avail(&port->write_fifo);
402 spin_unlock_irqrestore(&port->lock, flags); 387 spin_unlock_irqrestore(&port->lock, flags);
@@ -410,8 +395,6 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty)
410 int chars = 0; 395 int chars = 0;
411 unsigned long flags; 396 unsigned long flags;
412 397
413 dbg("%s(port = %d)", __func__, port->number);
414
415 spin_lock_irqsave(&port->lock, flags); 398 spin_lock_irqsave(&port->lock, flags);
416 chars = kfifo_len(&port->write_fifo); 399 chars = kfifo_len(&port->write_fifo);
417 spin_unlock_irqrestore(&port->lock, flags); 400 spin_unlock_irqrestore(&port->lock, flags);
@@ -437,8 +420,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
437 __le16 divisor; 420 __le16 divisor;
438 int br; 421 int br;
439 422
440 dbg("%s(port = %d)", __func__, port->number);
441
442 if (!tty) { 423 if (!tty) {
443 dbg("%s(): no tty structures", __func__); 424 dbg("%s(): no tty structures", __func__);
444 return; 425 return;
@@ -545,8 +526,6 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
545 unsigned long flags; 526 unsigned long flags;
546 int result; 527 int result;
547 528
548 dbg("%s(port = %d)", __func__, port->number);
549
550 usb_clear_halt(serial->dev, port->write_urb->pipe); 529 usb_clear_halt(serial->dev, port->write_urb->pipe);
551 usb_clear_halt(serial->dev, port->read_urb->pipe); 530 usb_clear_halt(serial->dev, port->read_urb->pipe);
552 531
@@ -602,8 +581,6 @@ static void oti6858_close(struct usb_serial_port *port)
602 struct oti6858_private *priv = usb_get_serial_port_data(port); 581 struct oti6858_private *priv = usb_get_serial_port_data(port);
603 unsigned long flags; 582 unsigned long flags;
604 583
605 dbg("%s(port = %d)", __func__, port->number);
606
607 spin_lock_irqsave(&port->lock, flags); 584 spin_lock_irqsave(&port->lock, flags);
608 /* clear out any remaining data in the buffer */ 585 /* clear out any remaining data in the buffer */
609 kfifo_reset_out(&port->write_fifo); 586 kfifo_reset_out(&port->write_fifo);
@@ -633,9 +610,6 @@ static int oti6858_tiocmset(struct tty_struct *tty,
633 dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)", 610 dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
634 __func__, port->number, set, clear); 611 __func__, port->number, set, clear);
635 612
636 if (!usb_get_intfdata(port->serial->interface))
637 return -ENODEV;
638
639 /* FIXME: check if this is correct (active high/low) */ 613 /* FIXME: check if this is correct (active high/low) */
640 spin_lock_irqsave(&priv->lock, flags); 614 spin_lock_irqsave(&priv->lock, flags);
641 control = priv->pending_setup.control; 615 control = priv->pending_setup.control;
@@ -663,11 +637,6 @@ static int oti6858_tiocmget(struct tty_struct *tty)
663 unsigned pin_state; 637 unsigned pin_state;
664 unsigned result = 0; 638 unsigned result = 0;
665 639
666 dbg("%s(port = %d)", __func__, port->number);
667
668 if (!usb_get_intfdata(port->serial->interface))
669 return -ENODEV;
670
671 spin_lock_irqsave(&priv->lock, flags); 640 spin_lock_irqsave(&priv->lock, flags);
672 pin_state = priv->status.pin_state & PIN_MASK; 641 pin_state = priv->status.pin_state & PIN_MASK;
673 spin_unlock_irqrestore(&priv->lock, flags); 642 spin_unlock_irqrestore(&priv->lock, flags);
@@ -750,8 +719,6 @@ static void oti6858_release(struct usb_serial *serial)
750{ 719{
751 int i; 720 int i;
752 721
753 dbg("%s()", __func__);
754
755 for (i = 0; i < serial->num_ports; ++i) 722 for (i = 0; i < serial->num_ports; ++i)
756 kfree(usb_get_serial_port_data(serial->port[i])); 723 kfree(usb_get_serial_port_data(serial->port[i]));
757} 724}
@@ -763,9 +730,6 @@ static void oti6858_read_int_callback(struct urb *urb)
763 int transient = 0, can_recv = 0, resubmit = 1; 730 int transient = 0, can_recv = 0, resubmit = 1;
764 int status = urb->status; 731 int status = urb->status;
765 732
766 dbg("%s(port = %d, status = %d)",
767 __func__, port->number, status);
768
769 switch (status) { 733 switch (status) {
770 case 0: 734 case 0:
771 /* success */ 735 /* success */
@@ -882,9 +846,6 @@ static void oti6858_read_bulk_callback(struct urb *urb)
882 int status = urb->status; 846 int status = urb->status;
883 int result; 847 int result;
884 848
885 dbg("%s(port = %d, status = %d)",
886 __func__, port->number, status);
887
888 spin_lock_irqsave(&priv->lock, flags); 849 spin_lock_irqsave(&priv->lock, flags);
889 priv->flags.read_urb_in_use = 0; 850 priv->flags.read_urb_in_use = 0;
890 spin_unlock_irqrestore(&priv->lock, flags); 851 spin_unlock_irqrestore(&priv->lock, flags);
@@ -916,9 +877,6 @@ static void oti6858_write_bulk_callback(struct urb *urb)
916 int status = urb->status; 877 int status = urb->status;
917 int result; 878 int result;
918 879
919 dbg("%s(port = %d, status = %d)",
920 __func__, port->number, status);
921
922 switch (status) { 880 switch (status) {
923 case 0: 881 case 0:
924 /* success */ 882 /* success */
@@ -958,7 +916,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
958 } 916 }
959} 917}
960 918
961module_usb_serial_driver(oti6858_driver, serial_drivers); 919module_usb_serial_driver(serial_drivers, id_table);
962 920
963MODULE_DESCRIPTION(OTI6858_DESCRIPTION); 921MODULE_DESCRIPTION(OTI6858_DESCRIPTION);
964MODULE_AUTHOR(OTI6858_AUTHOR); 922MODULE_AUTHOR(OTI6858_AUTHOR);