diff options
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 056e1923c4de..dd42f57089ff 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -599,10 +599,11 @@ static void edge_interrupt_callback (struct urb *urb) | |||
599 | int txCredits; | 599 | int txCredits; |
600 | int portNumber; | 600 | int portNumber; |
601 | int result; | 601 | int result; |
602 | int status = urb->status; | ||
602 | 603 | ||
603 | dbg("%s", __FUNCTION__); | 604 | dbg("%s", __FUNCTION__); |
604 | 605 | ||
605 | switch (urb->status) { | 606 | switch (status) { |
606 | case 0: | 607 | case 0: |
607 | /* success */ | 608 | /* success */ |
608 | break; | 609 | break; |
@@ -610,10 +611,12 @@ static void edge_interrupt_callback (struct urb *urb) | |||
610 | case -ENOENT: | 611 | case -ENOENT: |
611 | case -ESHUTDOWN: | 612 | case -ESHUTDOWN: |
612 | /* this urb is terminated, clean up */ | 613 | /* this urb is terminated, clean up */ |
613 | dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); | 614 | dbg("%s - urb shutting down with status: %d", |
615 | __FUNCTION__, status); | ||
614 | return; | 616 | return; |
615 | default: | 617 | default: |
616 | dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); | 618 | dbg("%s - nonzero urb status received: %d", |
619 | __FUNCTION__, status); | ||
617 | goto exit; | 620 | goto exit; |
618 | } | 621 | } |
619 | 622 | ||
@@ -688,13 +691,15 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
688 | { | 691 | { |
689 | struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; | 692 | struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; |
690 | unsigned char *data = urb->transfer_buffer; | 693 | unsigned char *data = urb->transfer_buffer; |
691 | int status; | 694 | int retval; |
692 | __u16 raw_data_length; | 695 | __u16 raw_data_length; |
696 | int status = urb->status; | ||
693 | 697 | ||
694 | dbg("%s", __FUNCTION__); | 698 | dbg("%s", __FUNCTION__); |
695 | 699 | ||
696 | if (urb->status) { | 700 | if (status) { |
697 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); | 701 | dbg("%s - nonzero read bulk status received: %d", |
702 | __FUNCTION__, status); | ||
698 | edge_serial->read_in_progress = false; | 703 | edge_serial->read_in_progress = false; |
699 | return; | 704 | return; |
700 | } | 705 | } |
@@ -722,9 +727,11 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
722 | if (edge_serial->rxBytesAvail > 0) { | 727 | if (edge_serial->rxBytesAvail > 0) { |
723 | dbg("%s - posting a read", __FUNCTION__); | 728 | dbg("%s - posting a read", __FUNCTION__); |
724 | edge_serial->read_urb->dev = edge_serial->serial->dev; | 729 | edge_serial->read_urb->dev = edge_serial->serial->dev; |
725 | status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); | 730 | retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); |
726 | if (status) { | 731 | if (retval) { |
727 | dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status); | 732 | dev_err(&urb->dev->dev, |
733 | "%s - usb_submit_urb(read bulk) failed, " | ||
734 | "retval = %d\n", __FUNCTION__, retval); | ||
728 | edge_serial->read_in_progress = false; | 735 | edge_serial->read_in_progress = false; |
729 | } | 736 | } |
730 | } else { | 737 | } else { |
@@ -744,11 +751,13 @@ static void edge_bulk_out_data_callback (struct urb *urb) | |||
744 | { | 751 | { |
745 | struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; | 752 | struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; |
746 | struct tty_struct *tty; | 753 | struct tty_struct *tty; |
754 | int status = urb->status; | ||
747 | 755 | ||
748 | dbg("%s", __FUNCTION__); | 756 | dbg("%s", __FUNCTION__); |
749 | 757 | ||
750 | if (urb->status) { | 758 | if (status) { |
751 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); | 759 | dbg("%s - nonzero write bulk status received: %d", |
760 | __FUNCTION__, status); | ||
752 | } | 761 | } |
753 | 762 | ||
754 | tty = edge_port->port->tty; | 763 | tty = edge_port->port->tty; |
@@ -1504,15 +1513,6 @@ static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old | |||
1504 | } | 1513 | } |
1505 | 1514 | ||
1506 | cflag = tty->termios->c_cflag; | 1515 | cflag = tty->termios->c_cflag; |
1507 | /* check that they really want us to change something */ | ||
1508 | if (old_termios) { | ||
1509 | if (cflag == old_termios->c_cflag && | ||
1510 | tty->termios->c_iflag == old_termios->c_iflag) { | ||
1511 | dbg("%s - nothing to change", __FUNCTION__); | ||
1512 | return; | ||
1513 | } | ||
1514 | } | ||
1515 | |||
1516 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, | 1516 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, |
1517 | tty->termios->c_cflag, tty->termios->c_iflag); | 1517 | tty->termios->c_cflag, tty->termios->c_iflag); |
1518 | if (old_termios) { | 1518 | if (old_termios) { |