aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-10-25 12:56:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-25 14:11:19 -0400
commite681b66f2e19fadbe8a7e2a17900978cb6bc921f (patch)
tree8b751828c1853ee35f3067d9ede2a0baf3f68502 /drivers/usb/serial
parent28c3ae9a8cf45f439c9a0779ebd0256e2ae72813 (diff)
USB: mos7840: remove invalid disconnect handling
Remove private zombie flag used to signal disconnect and to prevent control urb from being submitted from interrupt urb completion handler. The control urb will not be re-submitted as both the control urb and the interrupt urb is killed on disconnect. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/mos7840.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index f2c4bb709747..84f8c106e5e9 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -222,7 +222,6 @@ struct moschip_port {
222 __u8 shadowMCR; /* last MCR value received */ 222 __u8 shadowMCR; /* last MCR value received */
223 char open; 223 char open;
224 char open_ports; 224 char open_ports;
225 char zombie;
226 wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */ 225 wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */
227 wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */ 226 wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */
228 int delta_msr_cond; 227 int delta_msr_cond;
@@ -674,14 +673,7 @@ static void mos7840_interrupt_callback(struct urb *urb)
674 wreg = MODEM_STATUS_REGISTER; 673 wreg = MODEM_STATUS_REGISTER;
675 break; 674 break;
676 } 675 }
677 spin_lock(&mos7840_port->pool_lock); 676 rv = mos7840_get_reg(mos7840_port, wval, wreg, &Data);
678 if (!mos7840_port->zombie) {
679 rv = mos7840_get_reg(mos7840_port, wval, wreg, &Data);
680 } else {
681 spin_unlock(&mos7840_port->pool_lock);
682 return;
683 }
684 spin_unlock(&mos7840_port->pool_lock);
685 } 677 }
686 } 678 }
687 } 679 }
@@ -2598,9 +2590,6 @@ static void mos7840_disconnect(struct usb_serial *serial)
2598 for (i = 0; i < serial->num_ports; ++i) { 2590 for (i = 0; i < serial->num_ports; ++i) {
2599 mos7840_port = mos7840_get_port_private(serial->port[i]); 2591 mos7840_port = mos7840_get_port_private(serial->port[i]);
2600 if (mos7840_port) { 2592 if (mos7840_port) {
2601 spin_lock_irqsave(&mos7840_port->pool_lock, flags);
2602 mos7840_port->zombie = 1;
2603 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
2604 usb_kill_urb(mos7840_port->control_urb); 2593 usb_kill_urb(mos7840_port->control_urb);
2605 } 2594 }
2606 } 2595 }