Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118970
b: refs/heads/master
c: ad0b65e
h: refs/heads/master
v: v3
  • Loading branch information
Brandon Philips authored and Greg Kroah-Hartman committed Nov 13, 2008
1 parent b89bcd0 commit ec69dc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 881e3c9867c585e632dfa4ccb0848b62debc64c7
refs/heads/master: ad0b65efd12d020b046cde8d6f474e37bb98dd73
9 changes: 4 additions & 5 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *acm)
}

/*
* Finish write.
* Finish write. Caller must hold acm->write_lock
*/
static void acm_write_done(struct acm *acm, struct acm_wb *wb)
{
unsigned long flags;

spin_lock_irqsave(&acm->write_lock, flags);
wb->use = 0;
acm->transmitting--;
spin_unlock_irqrestore(&acm->write_lock, flags);
}

/*
Expand Down Expand Up @@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *urb)
{
struct acm_wb *wb = urb->context;
struct acm *acm = wb->instance;
unsigned long flags;

if (verbose || urb->status
|| (urb->actual_length != urb->transfer_buffer_length))
Expand All @@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *urb)
urb->transfer_buffer_length,
urb->status);

spin_lock_irqsave(&acm->write_lock, flags);
acm_write_done(acm, wb);
spin_unlock_irqrestore(&acm->write_lock, flags);
if (ACM_READY(acm))
schedule_work(&acm->work);
else
Expand Down

0 comments on commit ec69dc0

Please sign in to comment.