diff options
Diffstat (limited to 'drivers/usb/serial/oti6858.c')
-rw-r--r-- | drivers/usb/serial/oti6858.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 4c29e6c2bda7..2161d1c3c089 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c | |||
@@ -264,7 +264,6 @@ static void setup_line(struct work_struct *work) | |||
264 | spin_unlock_irqrestore(&priv->lock, flags); | 264 | spin_unlock_irqrestore(&priv->lock, flags); |
265 | 265 | ||
266 | dbg("%s(): submitting interrupt urb", __func__); | 266 | dbg("%s(): submitting interrupt urb", __func__); |
267 | port->interrupt_in_urb->dev = port->serial->dev; | ||
268 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 267 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
269 | if (result != 0) { | 268 | if (result != 0) { |
270 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" | 269 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" |
@@ -321,7 +320,6 @@ static void send_data(struct work_struct *work) | |||
321 | priv->flags.write_urb_in_use = 0; | 320 | priv->flags.write_urb_in_use = 0; |
322 | 321 | ||
323 | dbg("%s(): submitting interrupt urb", __func__); | 322 | dbg("%s(): submitting interrupt urb", __func__); |
324 | port->interrupt_in_urb->dev = port->serial->dev; | ||
325 | result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); | 323 | result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); |
326 | if (result != 0) { | 324 | if (result != 0) { |
327 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" | 325 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" |
@@ -334,7 +332,6 @@ static void send_data(struct work_struct *work) | |||
334 | port->write_urb->transfer_buffer, | 332 | port->write_urb->transfer_buffer, |
335 | count, &port->lock); | 333 | count, &port->lock); |
336 | port->write_urb->transfer_buffer_length = count; | 334 | port->write_urb->transfer_buffer_length = count; |
337 | port->write_urb->dev = port->serial->dev; | ||
338 | result = usb_submit_urb(port->write_urb, GFP_NOIO); | 335 | result = usb_submit_urb(port->write_urb, GFP_NOIO); |
339 | if (result != 0) { | 336 | if (result != 0) { |
340 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" | 337 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" |
@@ -583,13 +580,12 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
583 | kfree(buf); | 580 | kfree(buf); |
584 | 581 | ||
585 | dbg("%s(): submitting interrupt urb", __func__); | 582 | dbg("%s(): submitting interrupt urb", __func__); |
586 | port->interrupt_in_urb->dev = serial->dev; | ||
587 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 583 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
588 | if (result != 0) { | 584 | if (result != 0) { |
589 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" | 585 | dev_err(&port->dev, "%s(): usb_submit_urb() failed" |
590 | " with error %d\n", __func__, result); | 586 | " with error %d\n", __func__, result); |
591 | oti6858_close(port); | 587 | oti6858_close(port); |
592 | return -EPROTO; | 588 | return result; |
593 | } | 589 | } |
594 | 590 | ||
595 | /* setup termios */ | 591 | /* setup termios */ |
@@ -837,7 +833,6 @@ static void oti6858_read_int_callback(struct urb *urb) | |||
837 | if (can_recv) { | 833 | if (can_recv) { |
838 | int result; | 834 | int result; |
839 | 835 | ||
840 | port->read_urb->dev = port->serial->dev; | ||
841 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 836 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
842 | if (result != 0) { | 837 | if (result != 0) { |
843 | priv->flags.read_urb_in_use = 0; | 838 | priv->flags.read_urb_in_use = 0; |
@@ -866,7 +861,6 @@ static void oti6858_read_int_callback(struct urb *urb) | |||
866 | int result; | 861 | int result; |
867 | 862 | ||
868 | /* dbg("%s(): submitting interrupt urb", __func__); */ | 863 | /* dbg("%s(): submitting interrupt urb", __func__); */ |
869 | urb->dev = port->serial->dev; | ||
870 | result = usb_submit_urb(urb, GFP_ATOMIC); | 864 | result = usb_submit_urb(urb, GFP_ATOMIC); |
871 | if (result != 0) { | 865 | if (result != 0) { |
872 | dev_err(&urb->dev->dev, | 866 | dev_err(&urb->dev->dev, |
@@ -894,18 +888,6 @@ static void oti6858_read_bulk_callback(struct urb *urb) | |||
894 | spin_unlock_irqrestore(&priv->lock, flags); | 888 | spin_unlock_irqrestore(&priv->lock, flags); |
895 | 889 | ||
896 | if (status != 0) { | 890 | if (status != 0) { |
897 | /* | ||
898 | if (status == -EPROTO) { | ||
899 | * PL2303 mysteriously fails with -EPROTO reschedule | ||
900 | the read * | ||
901 | dbg("%s - caught -EPROTO, resubmitting the urb", | ||
902 | __func__); | ||
903 | result = usb_submit_urb(urb, GFP_ATOMIC); | ||
904 | if (result) | ||
905 | dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result); | ||
906 | return; | ||
907 | } | ||
908 | */ | ||
909 | dbg("%s(): unable to handle the error, exiting", __func__); | 891 | dbg("%s(): unable to handle the error, exiting", __func__); |
910 | return; | 892 | return; |
911 | } | 893 | } |
@@ -918,7 +900,6 @@ static void oti6858_read_bulk_callback(struct urb *urb) | |||
918 | tty_kref_put(tty); | 900 | tty_kref_put(tty); |
919 | 901 | ||
920 | /* schedule the interrupt urb */ | 902 | /* schedule the interrupt urb */ |
921 | port->interrupt_in_urb->dev = port->serial->dev; | ||
922 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 903 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
923 | if (result != 0 && result != -EPERM) { | 904 | if (result != 0 && result != -EPERM) { |
924 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," | 905 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," |
@@ -955,7 +936,6 @@ static void oti6858_write_bulk_callback(struct urb *urb) | |||
955 | dbg("%s(): overflow in write", __func__); | 936 | dbg("%s(): overflow in write", __func__); |
956 | 937 | ||
957 | port->write_urb->transfer_buffer_length = 1; | 938 | port->write_urb->transfer_buffer_length = 1; |
958 | port->write_urb->dev = port->serial->dev; | ||
959 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 939 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
960 | if (result) { | 940 | if (result) { |
961 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," | 941 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," |
@@ -968,7 +948,6 @@ static void oti6858_write_bulk_callback(struct urb *urb) | |||
968 | priv->flags.write_urb_in_use = 0; | 948 | priv->flags.write_urb_in_use = 0; |
969 | 949 | ||
970 | /* schedule the interrupt urb if we are still open */ | 950 | /* schedule the interrupt urb if we are still open */ |
971 | port->interrupt_in_urb->dev = port->serial->dev; | ||
972 | dbg("%s(): submitting interrupt urb", __func__); | 951 | dbg("%s(): submitting interrupt urb", __func__); |
973 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 952 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
974 | if (result != 0) { | 953 | if (result != 0) { |