diff options
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 3027ada1b812..d9d9340abe60 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -60,8 +60,6 @@ static struct acm *acm_table[ACM_TTY_MINORS]; | |||
60 | 60 | ||
61 | static DEFINE_MUTEX(acm_table_lock); | 61 | static DEFINE_MUTEX(acm_table_lock); |
62 | 62 | ||
63 | #define ACM_READY(acm) (acm && acm->dev && acm->port.count) | ||
64 | |||
65 | /* | 63 | /* |
66 | * acm_table accessors | 64 | * acm_table accessors |
67 | */ | 65 | */ |
@@ -319,9 +317,6 @@ static void acm_ctrl_irq(struct urb *urb) | |||
319 | goto exit; | 317 | goto exit; |
320 | } | 318 | } |
321 | 319 | ||
322 | if (!ACM_READY(acm)) | ||
323 | goto exit; | ||
324 | |||
325 | usb_mark_last_busy(acm->dev); | 320 | usb_mark_last_busy(acm->dev); |
326 | 321 | ||
327 | data = (unsigned char *)(dr + 1); | 322 | data = (unsigned char *)(dr + 1); |
@@ -481,8 +476,7 @@ static void acm_write_bulk(struct urb *urb) | |||
481 | spin_lock_irqsave(&acm->write_lock, flags); | 476 | spin_lock_irqsave(&acm->write_lock, flags); |
482 | acm_write_done(acm, wb); | 477 | acm_write_done(acm, wb); |
483 | spin_unlock_irqrestore(&acm->write_lock, flags); | 478 | spin_unlock_irqrestore(&acm->write_lock, flags); |
484 | if (ACM_READY(acm)) | 479 | schedule_work(&acm->work); |
485 | schedule_work(&acm->work); | ||
486 | } | 480 | } |
487 | 481 | ||
488 | static void acm_softint(struct work_struct *work) | 482 | static void acm_softint(struct work_struct *work) |
@@ -492,8 +486,6 @@ static void acm_softint(struct work_struct *work) | |||
492 | 486 | ||
493 | dev_vdbg(&acm->data->dev, "%s\n", __func__); | 487 | dev_vdbg(&acm->data->dev, "%s\n", __func__); |
494 | 488 | ||
495 | if (!ACM_READY(acm)) | ||
496 | return; | ||
497 | tty = tty_port_tty_get(&acm->port); | 489 | tty = tty_port_tty_get(&acm->port); |
498 | if (!tty) | 490 | if (!tty) |
499 | return; | 491 | return; |