aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-26 13:23:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 18:04:04 -0400
commit7cdc3355a75584f35eab89ea324375594a61e81f (patch)
treeb9fa733bad81d8c2cf851084726ad49a6628cbf6 /drivers/usb/serial/sierra.c
parenta283d080a49a5014f525bf722e5a6a07835e45ef (diff)
USB: sierra: remove redundant modem-control requests
The tty-port implementation has already made sure that DTR/RTS have been raised and lowered by calling dtr_rts so remove the redundant calls from open and close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index ac5e20d9bd24..3a2f5b80d875 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -769,14 +769,7 @@ static void sierra_close(struct usb_serial_port *port)
769 769
770 portdata = usb_get_serial_port_data(port); 770 portdata = usb_get_serial_port_data(port);
771 771
772 portdata->rts_state = 0; 772 usb_autopm_get_interface_no_resume(serial->interface);
773 portdata->dtr_state = 0;
774
775 /* odd error handling due to pm counters */
776 if (!usb_autopm_get_interface(serial->interface))
777 sierra_send_setup(port);
778 else
779 usb_autopm_get_interface_no_resume(serial->interface);
780 773
781 spin_lock_irq(&intfdata->susp_lock); 774 spin_lock_irq(&intfdata->susp_lock);
782 portdata->opened = 0; 775 portdata->opened = 0;
@@ -817,11 +810,6 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
817 810
818 portdata = usb_get_serial_port_data(port); 811 portdata = usb_get_serial_port_data(port);
819 812
820 /* Set some sane defaults */
821 portdata->rts_state = 1;
822 portdata->dtr_state = 1;
823
824
825 endpoint = port->bulk_in_endpointAddress; 813 endpoint = port->bulk_in_endpointAddress;
826 for (i = 0; i < portdata->num_in_urbs; i++) { 814 for (i = 0; i < portdata->num_in_urbs; i++) {
827 urb = sierra_setup_urb(serial, endpoint, USB_DIR_IN, port, 815 urb = sierra_setup_urb(serial, endpoint, USB_DIR_IN, port,
@@ -837,8 +825,6 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
837 if (err) 825 if (err)
838 goto err_submit; 826 goto err_submit;
839 827
840 sierra_send_setup(port);
841
842 spin_lock_irq(&intfdata->susp_lock); 828 spin_lock_irq(&intfdata->susp_lock);
843 portdata->opened = 1; 829 portdata->opened = 1;
844 if (++intfdata->open_ports == 1) 830 if (++intfdata->open_ports == 1)