From patchwork Tue Oct 25 00:36:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9393831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D364E60231 for ; Tue, 25 Oct 2016 01:34:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C69BD28ED5 for ; Tue, 25 Oct 2016 01:34:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0F528EE5; Tue, 25 Oct 2016 01:34:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE5228ED5 for ; Tue, 25 Oct 2016 01:34:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5CBDF266E07; Tue, 25 Oct 2016 03:33:59 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9DBA1266C4B; Tue, 25 Oct 2016 03:31:34 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 96FAA266C4B; Tue, 25 Oct 2016 02:36:46 +0200 (CEST) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 5257026683E for ; Tue, 25 Oct 2016 02:36:40 +0200 (CEST) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 25 Oct 2016 09:36:38 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id E5E5F477F3; Tue, 25 Oct 2016 09:36:38 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id C4D8D18070; Tue, 25 Oct 2016 09:36:38 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 976791806F; Tue, 25 Oct 2016 09:36:38 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id KAD21494; Tue, 25 Oct 2016 09:36:38 +0900 X-IronPort-AV: E=Sophos;i="5.31,543,1473087600"; d="scan'";a="223816400" Received: from mail-pu1apc01lp0024.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.24]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 25 Oct 2016 09:36:39 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8NaSpA1qQh5hfyQSuWjayL75wj2xjJWr/cKbR402BBw=; b=NeNT9OSpMS5f0W7Dg1aFnQt38jsIdMpdEZrq92bB1mB58L6JA98anPBKQLiuhAPtWl5oele7uDuGj4B51HwboVHOssysFJ8zLhclp2ACjWtkv3oFwp8NFZBQ6ZE4PyRb/i6lD5iJ6KdPf7aTcFjH141I6Ddt2dlftp43XjCOIwc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by KL1PR0601MB1447.apcprd06.prod.outlook.com (10.169.69.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Tue, 25 Oct 2016 00:36:34 +0000 Message-ID: <874m41clyo.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <878ttdcm17.wl%kuninori.morimoto.gx@renesas.com> References: <878ttdcm17.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 25 Oct 2016 00:36:34 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0021.jpnprd01.prod.outlook.com (10.161.24.31) To KL1PR0601MB1447.apcprd06.prod.outlook.com (10.169.69.25) X-MS-Office365-Filtering-Correlation-Id: b037214f-8c48-49d3-94fb-08d3fc6ef941 X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1447; 2:vpXk9kHo07LUy90hwjBMxVpdkI+5iIgni3kgHwwcHcL6MJ3VxC7OTfpXGAbb0SOR37ijeCvRQvxlDYKJYYVQnuIxBlE5rWrCihYO3ODB8mCnOFHZInfqbf2GrQKh21FDkOLwaO4aSjOcWNswiLMhwpM1+L/J0je8/sGHyiLGEOPnXACJ5ou5+ETvJevKFXW0iO+tVybDCdmJYhYHEgeuTg==; 3:1zwYiZE633IeWd6qPq1a2O8iKA/Zy2RadhuuQVrkFqiO/XW5wb6F+Ri+phtY1yyAtfEMqKOPP/gid403u6tiHyoB+w/q+QqK1Ve9SUxVfBUvxCTRcDuKaEsXIqtmpPvLBOuJjRN8sA/+XfMh37jwqw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:KL1PR0601MB1447; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1447; 25:Eo+u54kZ6ok+iNlUh1CfY5mH0n+JXmSZ7PM5RAnbznuNWYo2fGmzz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DBi9UKVT4UBGdgV++FwMrkVps/7e+0Xx3bK822E7JbA/NuwPipjmYzgPvzUhp7M7cY67CqTz53h/kvlqEJYgVxPpaKivV2WhYgsvz8be6r/haA4AGqPcMFXonoynNEIXT2qnIUZA2clbVJBx4gYEEQtH2zsdniqem+SfNoUiGRpVBHRENPV5oSoacS8q6il2MOgxsTNkJuJX3xRFY+6YNufGLeZ1/jwhkz8XSd72uYVvdxlNMBC+vo3csRdLvQtp9U/+V15DIN8N6tnpQq4sWdnHOdG5WYuJixIC5hglhbi5gJsBcVka5+k36avU2mq6MIZnsUMOIlp4ZfwSaREsAV7Kg0MDKETgMJU8hBSaNdnlFzu9Xlm0GP/NHgR45Cpy+znkgaDAi4iLDGThlZ3BC7veE7LyejxpJhgtEA6Vdj+jEHU7tRNJbgzoeuQKgpF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:KL1PR0601MB1447; BCL:0; PCL:0; RULEID:; SRVR:KL1PR0601MB1447; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1447; 4:MMhMC9YpCoui7hciouljXgNviO4otkmoMM5faYcCDwZeNGhsGlV8mG1jMmq1MUZOWdVIlCe0rjRSP3pUR2j7ltmfq/vaCcS0hmLYeIZtnI7wDYbS0ts4JXiK7eCJ0x3MPB3TJbk56dToomU3VfzDNWpWDloA2f/E5q2x4LLt0csPa9K3k40oakiaLQHAZO75JmWWh/WpZgpaaUq3ZZXyj6BdpC5Qj/6m5c9xn/AJYwweSt2XTDx87paAgP+sfUg1B9gHf3Cn5vcs79qfFpCi5vGNfwqU04+CfjqJHHDFmse36QdJZQ8i8HW5yoaOFy2GTXBJ99bx7uBle/ujMXz278pjwRylwtU2VLo/IPiKR3UVXkPS6ZRATfixwK0q9vLE8BMLsy1JEnMTmaMB0IbY9iixARAgPbon1VRiqOFjJDs= X-Forefront-PRVS: 01068D0A20 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(6916009)(81156014)(81166006)(189998001)(47776003)(110136003)(66066001)(19580395003)(77096005)(8676002)(83506001)(68736007)(19580405001)(92566002)(586003)(3846002)(305945005)(5660300001)(6116002)(2906002)(4326007)(7846002)(33646002)(7736002)(101416001)(69596002)(54356999)(76176999)(23726003)(86362001)(36756003)(50986999)(4001350100001)(50466002)(97736004)(53416004)(42186005)(106356001)(229853001)(105586002)(2950100002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR0601MB1447; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR0601MB1447; 23:5/VVVT+KNe5iViVW0EscvQSiJX1mtY7O+pjlAOX?= =?us-ascii?Q?e8v8Z6FmZWBauA4hqy8WJs6n5o46ZqmLbRHDrkvL1Q+Rd/GGd3cQW1OdvPiF?= =?us-ascii?Q?0m79pVx/ja7gnHy5JNbRE0RpsyAqM0WexPY8L792FZxsFrpkPOXuyQROze9T?= =?us-ascii?Q?g5KxC3MJAGqkFGi6fDZGxCUV+fOj+EGDBvb0vsplC4u6crxh9DTmS8RRIsP5?= =?us-ascii?Q?CknJYkBWuNDturcgz27dKTD3KTx1ih3G1/CObeyXJp9pNTE1gzaSjuRosE0H?= =?us-ascii?Q?MggB133WvheKuNT9NI1DCcJwI+qRg/GEjnHvNnOvVP0XR+Qx8t3x2ogjTcE2?= =?us-ascii?Q?qS01dkfsHGWBm/QruNQ/1vExgv+5izml4RppjSTG7DKENCyNwdT70qRaGmUZ?= =?us-ascii?Q?CLU3nQ4B7idFBkpvenyuJKIoLatVOqOP6D2GRTCZeSLAAwdLDGu9gcJpKgM0?= =?us-ascii?Q?ZFTX8CMJO7w4IATGQMBO6+GW4gHjy/XaqojoCy9a3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vxqsSEh/V2SoMVhX8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2016 00:36:34.3294 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1447 Cc: Linux-ALSA , Simon Subject: [alsa-devel] [PATCH 3/8] ASoC: rsnd: don't use devm_request_irq() for SSI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto SSI will use DMA mode, and migh be fallback to PIO mode. Using devm_request_irq() makes its operation more complex when it fallbacks to PIO mode. Let's use manual request_irq()/free_irq() Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/ssi.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 59cd982..b0338d0 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -644,10 +644,14 @@ static int rsnd_ssi_common_probe(struct rsnd_mod *mod, if (ret < 0) return ret; - ret = devm_request_irq(dev, ssi->irq, - rsnd_ssi_interrupt, - IRQF_SHARED, - dev_name(dev), mod); + /* + * SSI might be called again as PIO fallback + * It is easy to manual handling for IRQ request/free + */ + ret = request_irq(ssi->irq, + rsnd_ssi_interrupt, + IRQF_SHARED, + dev_name(dev), mod); return ret; } @@ -693,12 +697,9 @@ static int rsnd_ssi_dma_remove(struct rsnd_mod *mod, struct rsnd_priv *priv) { struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); - struct device *dev = rsnd_priv_to_dev(priv); - int irq = ssi->irq; /* PIO will request IRQ again */ - if (ssi->dma) - devm_free_irq(dev, irq, mod); + free_irq(ssi->irq, mod); rsnd_dma_detach(mod, &ssi->dma);