aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mct_u232.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r--drivers/usb/serial/mct_u232.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index b9e0fbacc8a4..e25c0c2791eb 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -399,7 +399,7 @@ static void mct_u232_shutdown (struct usb_serial *serial)
399 struct mct_u232_private *priv; 399 struct mct_u232_private *priv;
400 int i; 400 int i;
401 401
402 dbg("%s", __FUNCTION__); 402 dbg("%s", __func__);
403 403
404 for (i=0; i < serial->num_ports; ++i) { 404 for (i=0; i < serial->num_ports; ++i) {
405 /* My special items, the standard routines free my urbs */ 405 /* My special items, the standard routines free my urbs */
@@ -421,7 +421,7 @@ static int mct_u232_open (struct usb_serial_port *port, struct file *filp)
421 unsigned char last_lcr; 421 unsigned char last_lcr;
422 unsigned char last_msr; 422 unsigned char last_msr;
423 423
424 dbg("%s port %d", __FUNCTION__, port->number); 424 dbg("%s port %d", __func__, port->number);
425 425
426 /* Compensate for a hardware bug: although the Sitecom U232-P25 426 /* Compensate for a hardware bug: although the Sitecom U232-P25
427 * device reports a maximum output packet size of 32 bytes, 427 * device reports a maximum output packet size of 32 bytes,
@@ -486,7 +486,7 @@ static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
486 unsigned int c_cflag; 486 unsigned int c_cflag;
487 unsigned int control_state; 487 unsigned int control_state;
488 struct mct_u232_private *priv = usb_get_serial_port_data(port); 488 struct mct_u232_private *priv = usb_get_serial_port_data(port);
489 dbg("%s port %d", __FUNCTION__, port->number); 489 dbg("%s port %d", __func__, port->number);
490 490
491 if (port->tty) { 491 if (port->tty) {
492 c_cflag = port->tty->termios->c_cflag; 492 c_cflag = port->tty->termios->c_cflag;
@@ -532,21 +532,21 @@ static void mct_u232_read_int_callback (struct urb *urb)
532 case -ESHUTDOWN: 532 case -ESHUTDOWN:
533 /* this urb is terminated, clean up */ 533 /* this urb is terminated, clean up */
534 dbg("%s - urb shutting down with status: %d", 534 dbg("%s - urb shutting down with status: %d",
535 __FUNCTION__, status); 535 __func__, status);
536 return; 536 return;
537 default: 537 default:
538 dbg("%s - nonzero urb status received: %d", 538 dbg("%s - nonzero urb status received: %d",
539 __FUNCTION__, status); 539 __func__, status);
540 goto exit; 540 goto exit;
541 } 541 }
542 542
543 if (!serial) { 543 if (!serial) {
544 dbg("%s - bad serial pointer, exiting", __FUNCTION__); 544 dbg("%s - bad serial pointer, exiting", __func__);
545 return; 545 return;
546 } 546 }
547 547
548 dbg("%s - port %d", __FUNCTION__, port->number); 548 dbg("%s - port %d", __func__, port->number);
549 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 549 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
550 550
551 /* 551 /*
552 * Work-a-round: handle the 'usual' bulk-in pipe here 552 * Work-a-round: handle the 'usual' bulk-in pipe here
@@ -603,7 +603,7 @@ exit:
603 retval = usb_submit_urb (urb, GFP_ATOMIC); 603 retval = usb_submit_urb (urb, GFP_ATOMIC);
604 if (retval) 604 if (retval)
605 err ("%s - usb_submit_urb failed with result %d", 605 err ("%s - usb_submit_urb failed with result %d",
606 __FUNCTION__, retval); 606 __func__, retval);
607} /* mct_u232_read_int_callback */ 607} /* mct_u232_read_int_callback */
608 608
609static void mct_u232_set_termios (struct usb_serial_port *port, 609static void mct_u232_set_termios (struct usb_serial_port *port,
@@ -633,7 +633,7 @@ static void mct_u232_set_termios (struct usb_serial_port *port,
633 633
634 /* reassert DTR and RTS on transition from B0 */ 634 /* reassert DTR and RTS on transition from B0 */
635 if ((old_cflag & CBAUD) == B0) { 635 if ((old_cflag & CBAUD) == B0) {
636 dbg("%s: baud was B0", __FUNCTION__); 636 dbg("%s: baud was B0", __func__);
637 control_state |= TIOCM_DTR | TIOCM_RTS; 637 control_state |= TIOCM_DTR | TIOCM_RTS;
638 mct_u232_set_modem_ctrl(serial, control_state); 638 mct_u232_set_modem_ctrl(serial, control_state);
639 } 639 }
@@ -641,7 +641,7 @@ static void mct_u232_set_termios (struct usb_serial_port *port,
641 mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty)); 641 mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty));
642 642
643 if ((cflag & CBAUD) == B0 ) { 643 if ((cflag & CBAUD) == B0 ) {
644 dbg("%s: baud is B0", __FUNCTION__); 644 dbg("%s: baud is B0", __func__);
645 /* Drop RTS and DTR */ 645 /* Drop RTS and DTR */
646 control_state &= ~(TIOCM_DTR | TIOCM_RTS); 646 control_state &= ~(TIOCM_DTR | TIOCM_RTS);
647 mct_u232_set_modem_ctrl(serial, control_state); 647 mct_u232_set_modem_ctrl(serial, control_state);
@@ -696,7 +696,7 @@ static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
696 unsigned char lcr; 696 unsigned char lcr;
697 unsigned long flags; 697 unsigned long flags;
698 698
699 dbg("%sstate=%d", __FUNCTION__, break_state); 699 dbg("%sstate=%d", __func__, break_state);
700 700
701 spin_lock_irqsave(&priv->lock, flags); 701 spin_lock_irqsave(&priv->lock, flags);
702 lcr = priv->last_lcr; 702 lcr = priv->last_lcr;
@@ -715,7 +715,7 @@ static int mct_u232_tiocmget (struct usb_serial_port *port, struct file *file)
715 unsigned int control_state; 715 unsigned int control_state;
716 unsigned long flags; 716 unsigned long flags;
717 717
718 dbg("%s", __FUNCTION__); 718 dbg("%s", __func__);
719 719
720 spin_lock_irqsave(&priv->lock, flags); 720 spin_lock_irqsave(&priv->lock, flags);
721 control_state = priv->control_state; 721 control_state = priv->control_state;
@@ -732,7 +732,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
732 unsigned int control_state; 732 unsigned int control_state;
733 unsigned long flags; 733 unsigned long flags;
734 734
735 dbg("%s", __FUNCTION__); 735 dbg("%s", __func__);
736 736
737 spin_lock_irqsave(&priv->lock, flags); 737 spin_lock_irqsave(&priv->lock, flags);
738 control_state = priv->control_state; 738 control_state = priv->control_state;
@@ -754,7 +754,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
754static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file, 754static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
755 unsigned int cmd, unsigned long arg) 755 unsigned int cmd, unsigned long arg)
756{ 756{
757 dbg("%scmd=0x%x", __FUNCTION__, cmd); 757 dbg("%scmd=0x%x", __func__, cmd);
758 758
759 /* Based on code from acm.c and others */ 759 /* Based on code from acm.c and others */
760 switch (cmd) { 760 switch (cmd) {
@@ -769,7 +769,7 @@ static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
769 return 0; 769 return 0;
770 770
771 default: 771 default:
772 dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd); 772 dbg("%s: arg not supported - 0x%04x", __func__,cmd);
773 return(-ENOIOCTLCMD); 773 return(-ENOIOCTLCMD);
774 break; 774 break;
775 } 775 }
@@ -784,7 +784,7 @@ static void mct_u232_throttle (struct usb_serial_port *port)
784 struct tty_struct *tty; 784 struct tty_struct *tty;
785 785
786 tty = port->tty; 786 tty = port->tty;
787 dbg("%s - port %d", __FUNCTION__, port->number); 787 dbg("%s - port %d", __func__, port->number);
788 788
789 spin_lock_irqsave(&priv->lock, flags); 789 spin_lock_irqsave(&priv->lock, flags);
790 priv->rx_flags |= THROTTLED; 790 priv->rx_flags |= THROTTLED;
@@ -806,7 +806,7 @@ static void mct_u232_unthrottle (struct usb_serial_port *port)
806 unsigned int control_state; 806 unsigned int control_state;
807 struct tty_struct *tty; 807 struct tty_struct *tty;
808 808
809 dbg("%s - port %d", __FUNCTION__, port->number); 809 dbg("%s - port %d", __func__, port->number);
810 810
811 tty = port->tty; 811 tty = port->tty;
812 spin_lock_irqsave(&priv->lock, flags); 812 spin_lock_irqsave(&priv->lock, flags);