summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_acm.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-11-19 06:10:32 +0100
committerPaul Mackerras <paulus@samba.org>2008-11-19 06:10:32 +0100
commitcea555d384b85271035814c5adad23e6c7fc5d2a (patch)
tree1181b6333a69a135293ec75f8a48c849ee32c015 /drivers/usb/gadget/f_acm.c
parentpowerpc/mpic: Use new smp_request_message_ipi (diff)
parentMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff)
downloadlinux-cea555d384b85271035814c5adad23e6c7fc5d2a.tar.xz
linux-cea555d384b85271035814c5adad23e6c7fc5d2a.zip
Merge branch 'linux-2.6' into next
Diffstat (limited to 'drivers/usb/gadget/f_acm.c')
-rw-r--r--drivers/usb/gadget/f_acm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 5ee1590b8e9c..c1d34df0b157 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *acm, u8 type, u16 value,
notify->wLength = cpu_to_le16(length);
memcpy(buf, data, length);
+ /* ep_queue() can complete immediately if it fills the fifo... */
+ spin_unlock(&acm->lock);
status = usb_ep_queue(ep, req, GFP_ATOMIC);
+ spin_lock(&acm->lock);
+
if (status < 0) {
ERROR(acm->port.func.config->cdev,
"acm ttyGS%d can't notify serial state, %d\n",