From patchwork Mon Jun 12 20:34:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 691775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C245EC88CB7 for ; Mon, 12 Jun 2023 20:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232529AbjFLUfF (ORCPT ); Mon, 12 Jun 2023 16:35:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232597AbjFLUep (ORCPT ); Mon, 12 Jun 2023 16:34:45 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2083.outbound.protection.outlook.com [40.107.104.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B2E9E53; Mon, 12 Jun 2023 13:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IRGF3q6NeO/S6AVhIf+AvWPO1sNgVK6sm6va1rem9yUOexEmWKzzOF4XbhWfXOTmZMzAzjDQsvoHD9swYL1kfnjZfGnIWfNKvRB7VkCoRxxZxZzseSPSGs52u0f0xJK7Abf6WKvwGVqbY/GO5saeD6jUdZtBlWoclFwVLQiPWXN9rTlvUj+4/1nn4smY/o1LLLdW0b1jEZobHHUGmXkTJRMalYoF+gmNiLioGx/Y6wacDTylcbVg3h+aJbvQQ8BFt/QnYs8mc/nD0jKrTiSNBawwnlYPLE0FsLxp3hUyQUspraugs+SmAh6b2g5zzIIoGxBN9XpNctOEdESeW1amjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QI8n0XPwXsaaH6UZQG+Zvq7pxrcY++lIzGOz4LgaYtE=; b=kGfY75RWVQVRoOMbZk0/ao5e5LWkEfqaAyVknMBFk2mowNdu2MInyW0nKexvBdJLxr4XDXXkRvst0Qk2oYz0ns1fqdBPjxLft7UWHuKTMnZdOlpL1huk4h4xZwZ4s1j32zGzqedB8uMoKDS48aOvn8pxDu4djEgxV4dQwCx9S3oFSAGol3scGAEP4yZSxrQ9GHVQaaVsQeuYmLv/o4VUN7Q9oGE0JKQ3Qaep4u80/LdnxxpzYme7J0+jpiZqmGt/Z9xiTxWNnl0ifKtw/9ZA6mzUtZywUxuGyB694k8NC8Rh+Po4h8ESdeOwarPIc1KGJvqKuqIXP+mkCkuU6cnJRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QI8n0XPwXsaaH6UZQG+Zvq7pxrcY++lIzGOz4LgaYtE=; b=X7t0ef/0+I00tFFygDpPcw4MFKf+8qHlp7G+9LrN1Z9QL+kNs9MYXp3+kyexNd5xmWZACtsJYgpZiDccSsFrkTQhh32hmpFYwll6e9vOWvjVVSF5Srw6DFuNFs+q3dtzix7vVK5GMOTFxWvkU32cDsM0Dh7nwtj+2lc2CgHeKac= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) by AM9PR04MB8907.eurprd04.prod.outlook.com (2603:10a6:20b:40a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Mon, 12 Jun 2023 20:34:42 +0000 Received: from VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::602f:42ad:882a:5ca7]) by VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::602f:42ad:882a:5ca7%3]) with mapi id 15.20.6455.045; Mon, 12 Jun 2023 20:34:42 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v4 02/12] dmaengine: fsl-edma: clean up fsl_edma_irq_exit() Date: Mon, 12 Jun 2023 16:34:08 -0400 Message-Id: <20230612203418.2017769-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230612203418.2017769-1-Frank.Li@nxp.com> References: <20230612203418.2017769-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ2PR07CA0016.namprd07.prod.outlook.com (2603:10b6:a03:505::16) To VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4845:EE_|AM9PR04MB8907:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f6de7b5-70bd-49b6-6db4-08db6b8473dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1vtiZcESxeow/w12Kld5NXkODeJ0dz5Icxu9WH0oYvWNIHPkmPLYZMG19qI9yijoi69t9YhnimIzUhNOp44B5FM8rbockcrL1arcnuKM124+Db7o/rN9AM74IGuLnoiNckohdDIczlAW7TyVxvt3vpgpHTKcnxdkZaPebLUMuME/BSUzxo4D36alW1AfNaYIkYshyfnuG7HjSuniNWfagtd4I8JVomY77dYm6jPv2WEtg1w2FcG91zfuDb8G1y9O0B1tf1JhvTTsuKyoPmALe0h2BsMSkZffxfA02lNsMmNzqoVf19OmLbSIJabZCI8m2lU5anabm61aGp+VoOUIfxW0ebJ5ZmRmDYcwRsenWDFBbrRoBf7RD4Wp0U7Qjn+o24t26P0O+4nXeLMPlO83fE5axn8ysCjUhzvUX/yE1eql5mcTKO4aJn9ICWGtTbAEUJDGANLEgzFOYMRCwqBrznQAk4x4gLIay5AAGJ1P24+ZfgPPGg0FhP46B8gFGq2p08K6GoRyC/F1s4pGZJqcdqOlYZ9NV8tRK9myPv1kWeeI28UMb6w3PV3aqrNXI3Zn+ObidITAmg5U1gJhI4QhNKo9FqIBY5bwh4Zp5lJeFkGMLCasW09V7+zQxbllsFfe2B8iz4H4aPefcjTeBDuf8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB4845.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(396003)(366004)(376002)(346002)(136003)(451199021)(66946007)(66476007)(66556008)(36756003)(186003)(478600001)(2616005)(2906002)(8676002)(316002)(41300700001)(86362001)(6486002)(921005)(6666004)(6506007)(1076003)(8936002)(83380400001)(5660300002)(26005)(52116002)(38100700002)(6512007)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bANhtFmkz8h5bPQSGinBoO96HhhaqOo6Fs27rkg2Iu9HeIliI1zpGHW4HKTQMF76JfDYfPBwzKY1XmacuB2Kmivh4jf7vAnGe409TAL+jnbJxg69sNmRh/U5IxJOCEG6onDjel7wo64q8Q/w9Ys0nAP3Iry1l+ftGQ2OreBRkU6r5mvzVkyqOavWGqvBbm2eaVadQHHXErSkDn/2FIuzpgozRPQaW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7w/ip2DA3rLwgHjU8j5cR/KoJrI5Wmd28+w4mUY5O5F1kDbPoBMJr8Pp2ZmM5MiWaU0CAmeGa4XJGbkJeRWfXbLEPR/PzN+nO+k/dxmO5AxpXRScgYbesT/wamOq8uPmiu5ND2jVDC0IGeNHesnQghIIKUHlhmTXxUSsYtqMdRhC0jp7vhtjyh1p4+Wd5PXodEsND0KoSTAtxFj/uTXHEOnwXD1t/tyO4sY9Z2G3G9qw/P3IoUto9ZNiVfCQMKmesYfctZuSFRxIRSmWPtGEhWJjE4zO0PLpKNBu6w5JIlTk8gQZ0cWX/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f6de7b5-70bd-49b6-6db4-08db6b8473dc X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4845.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 20:34:42.8239 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QXuuCXULRuwsuCUj3HwjM0W1Bg11shQDkNd9BmIulIZXfwx//r3MK/xjR7SNDPitcsxwB2IHqK4nJoThbT5Y3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8907 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In the probe function, devm_request_irq is now being used to automatically manage IRQ. It eliminates the need for manual IRQ freeing during removal. Signed-off-by: Frank Li Reviewed-by: Peng Fan --- drivers/dma/fsl-edma-main.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index e40769666e39..16305bb9a2ef 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -216,17 +216,6 @@ fsl_edma2_irq_init(struct platform_device *pdev, return 0; } -static void fsl_edma_irq_exit( - struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) -{ - if (fsl_edma->txirq == fsl_edma->errirq) { - devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); - } else { - devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); - devm_free_irq(&pdev->dev, fsl_edma->errirq, fsl_edma); - } -} - static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma, int nr_clocks) { int i; @@ -427,7 +416,6 @@ static int fsl_edma_remove(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); - fsl_edma_irq_exit(pdev, fsl_edma); fsl_edma_cleanup_vchan(&fsl_edma->dma_dev); of_dma_controller_free(np); dma_async_device_unregister(&fsl_edma->dma_dev);