From patchwork Wed Nov 14 14:40:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12847 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D059E4C1778 for ; Wed, 14 Nov 2012 14:40:33 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 62E9EA181C5 for ; Wed, 14 Nov 2012 14:40:33 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so650262iej.11 for ; Wed, 14 Nov 2012 06:40:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=VppB0RMtqq6mPScNExA530nvgnNd0Cc5d6/BSm/X1g8=; b=Gagf1sI5xaIWByCDaUrHvxiXspqjfzafP5OWGMglxJsIElpcO/fjbW3RgmbouCjW8g Lt5BsUtI4ZsGNtXeAmsIBRd7ttXF8unVirNLWpwVYlMIJ9TvnxD6U+jC4wjc+GGvFrTw A8V5G1azOUzpDsNgU9wMANkXRjT/3pZjFRum0+z+6xUGUv5MQ/8Y89Ne0kzss4g29EXR 6SmBcZdSz4rjgUGdSfMquhlW4RrP5WKL+Et7rCN7k7pU3ZGX5GQi1ZPuxeUlNruHulgP ZD9ie0w8FdmPG+qbJEWAOzVUFTcc3ckwfSGyOMKSlw6CvDNbWmudDWJ7vbJFtHPO+q6K aTVQ== Received: by 10.50.140.97 with SMTP id rf1mr1937376igb.70.1352904032846; Wed, 14 Nov 2012 06:40:32 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp670803igt; Wed, 14 Nov 2012 06:40:32 -0800 (PST) Received: by 10.14.174.194 with SMTP id x42mr88136005eel.22.1352904031514; Wed, 14 Nov 2012 06:40:31 -0800 (PST) Received: from eu1sys200aog103.obsmtp.com (eu1sys200aog103.obsmtp.com [207.126.144.115]) by mx.google.com with SMTP id l1si11999985een.121.2012.11.14.06.40.23 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Nov 2012 06:40:31 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.115 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.115; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.115 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKUKOtV4uYhY6DWHOjHYOpUiXqk+8hBOwC@postini.com; Wed, 14 Nov 2012 14:40:30 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 890E3E5; Wed, 14 Nov 2012 14:32:07 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 036E1F1B; Wed, 14 Nov 2012 14:40:19 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 034D624C2AB; Wed, 14 Nov 2012 15:40:01 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 14 Nov 2012 15:40:08 +0100 From: Linus Walleij To: Greg Kroah-Hartman , Felipe Balbi Cc: , Haipeng YU , Linus Walleij Subject: [PATCH] usb: gadget: fix switch off blocked in u_serial Date: Wed, 14 Nov 2012 15:40:01 +0100 Message-ID: <1352904001-24014-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkp4Fvcw8YW+8nJv/nSRftQ3V8+2ahR4w4pr5dkeDgsCl0MJpCkV221SH7ueOTf0M/TC1/2 From: Haipeng YU When a device is switched off by software, gserial_cleanup will be called, and switch off will be blocked in this function because wake_up_interruptible() in gs_close() can not wake_up the wait_event() in gserial_cleanup(), it should be changed to wake_up() to match the wait_event(). Signed-off-by: Haipeng YU Signed-off-by: Linus Walleij --- drivers/usb/gadget/u_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index f173952..2d074ba 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c @@ -887,7 +887,7 @@ static void gs_close(struct tty_struct *tty, struct file *file) pr_debug("gs_close: ttyGS%d (%p,%p) done!\n", port->port_num, tty, file); - wake_up_interruptible(&port->port.close_wait); + wake_up(&port->port.close_wait); exit: spin_unlock_irq(&port->port_lock); }