From patchwork Tue Jul 11 03:48:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13308872 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2BDEEB64DC for ; Tue, 11 Jul 2023 14:22:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A3043EC7; Tue, 11 Jul 2023 16:22:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3043EC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689085371; bh=jnza72F8PtcgB2Ut4Kjad6rRLEvFzQT/qjoBkpd06L8=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=GMl7XUHyr7UVwJnXnWPuKA/21JkoH3ecjr7/AAlZYCs1+Z0KmKFXmrjDOMuZLjRQW 7YKVhaic9k3wjmbVDdjCLNwwAMSrkXejL480Dfr1QHYVCEi1MgDKw85UFPtUF/+vV1 GbHkbcI/G15Q/ZJPgkHjXmDAyzmxKQ+wkRPS7Y5E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EC588F8024E; Tue, 11 Jul 2023 16:21:28 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 53C2FF80093; Tue, 11 Jul 2023 16:21:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C46FF8047D; Tue, 11 Jul 2023 05:49:18 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::72e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 60341F80093 for ; Tue, 11 Jul 2023 05:49:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60341F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=g7CrR/vN ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKwB1bHCLrhEGe4oqInfAQdB2kJzZhBUOqpQP5Ta6LXTFLIuSbI+8Cc6AFbd2hEQjLrvMEd05jlt2nrDqW1U0H0QoTgFzGCNnYj8A4swT5lvUoHDQPiUPhTpeK60q7f5HYqh63DTdWtPrVKZEUoJSD4bFwgJx5Blsdi4QgPrG3nrNv729BiAaHEqGopIo7iStF6iqyg6BbTJesXqPHwF3WQu5AZWqGqtYNYC/N9N9TccAMr3ZTlTbM1t0JwHTp402ojZxClhQ9X+VMftMD1H1aGJAneAJLiSlGf024YtlIeGtF2uzvtjzWap17YkWPpKz2TUC/+tEgATX21JT5gMog== 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=Qcx2CLMip+TskW0MjLXMBtoDwtSTCuRX+IeqqilVuiQ=; b=nEjBWnzXpx7zAwvv2RrVMy82p+oaaQX8VFXZ/Y0nne/Xo6cZNFTM4FyQKaPgrG1XSsQnd4GzEIofkhkdAS7eT4ehWjPb+ee2mwVWosXWLkkTsPT4z8RCLRLXLF7ec3Cg/SaDEES4NG0Hv5R+wREF45qR1qaz52o0zE3G4kE2hkE0+gSdzJcekIzGhAvacxLPQK5ma8yDV9OQ4g3nFsikcPxoRvuyn5Q3uyD+ErPrpsrylYh3uO7wzPZ0MMnG+nIZMHLjaf2/OFjuVXn+chRzZ1rfuBoGjvx39xpHXuj1KtOr0U9K9Tmg1lVNcWbtW8u80ytDm1OGz5GwRV7ZjAD1pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qcx2CLMip+TskW0MjLXMBtoDwtSTCuRX+IeqqilVuiQ=; b=g7CrR/vNoP21Lt5U+oEQBmJOlkR3my0XjF72E37opYkOJtvhY0PMhHg76sn2Mt0yfonrhGW4V4nxq3n6WtWLab2oNizkhN5aPbZpAkEmP8Yl+J+v4RJKcB1WviYEK/CRP5FSDx0WvHy1IkIfI7Q4r3U/9n6unqUsZoaJivt/G5pFUA85+BbWqjYVgSedNA3CvN6521h7g9VPsjqFKDUgVB+vluSbUnANN4y2m4SSMwNUtXryKUBzvyYiR0MiBLyo6aaUrxfAaBpahdP6RHPSiC3ke/5YzW+YMTw/P4XwPaWg/AknQHL5lijNMB6loXqsEtnyiwtDvT+5j+lf7ufztw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4385.apcprd06.prod.outlook.com (2603:1096:820:71::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Tue, 11 Jul 2023 03:48:58 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 03:48:57 +0000 From: Yangtao Li To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Yangtao Li , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] ASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource() Date: Tue, 11 Jul 2023 11:48:41 +0800 Message-Id: <20230711034846.69437-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR01CA0038.apcprd01.prod.exchangelabs.com (2603:1096:4:193::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4385:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e802745-1da3-411b-8c4d-08db81c1c0fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2qIsBUf5Xa61Y7E1dssbO6hURt0wxJwpaSer5PZzZTEzTpmD5Y4Tsp1Yh6H7n8v/NCG941+8GouoATIeqFoohLZbmDMwdBUoaBHIv2hnNXtuvhqmCJmAibjBbJFQNr2PQVfkjZNLEFfcIxmr3CyYt5XTp+NJUzJbODrUaL/noiTRqKOzTSTVh/XjNGTwQJowwZn3QNBxJ6AwiVN51hJadYOBrwqMgw5oglu+qcTNYTUi/1h9iNVNr5nlBBdDx0MylcnwqfAGmsXfng873ie8aYT5TXBdH/F0PblDG6hSDoTmXsblqab337DgNDDYv544liYrFImi7rEYc1fWOqAPF+gTQ3WayHrGTcRdbpF6oHX3zSEeIrRCAvZl36rkz5YfUTB/oRjYLX5oFmREhz3rlm42BkrjMhuAtxN2pdft8NCQVDg1yZCAsYnGmEhgPMGRNgvjQ9QoBDXa8MgUeD/njyxCpzubquLQ4bx00mkixKdrR8XbokTFMw26MgDOBmutvDSboRGcgjLvhtj1TcASIE2/j+0BHziPhrpwT8b+5GsrajHBn474bkolucOUyiZukfCnhjuPsIL37MYGE3kyO1aFwOn0Utv7S7CJEs2wXITZly2WUtRPTsgmOR8NCv9h X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(346002)(366004)(451199021)(478600001)(4326008)(52116002)(6486002)(66476007)(6666004)(36756003)(66556008)(41300700001)(110136005)(316002)(66946007)(86362001)(6506007)(83380400001)(26005)(1076003)(2616005)(186003)(38350700002)(6512007)(38100700002)(2906002)(8676002)(5660300002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ELrz9EZb6pVJjlyLrEc8YcDM4vA1l9XyvHEHsKlbqtRTnY4WXbolOumUdhaI5ycguVmeA8fJEIMsAFw0fRSzd9znDfZZLB+Do8dPjxk2zWtp6FT0Nk2KH+CUnjECyfHDt4568hUmD4tfsgr1hH10lYDoDujFpYFmdB/CcAAvd9KGI7qvR5yiBQqPj/5VgfDlb6IFxZ1n8sW+WYpuFg7o0j8G4iO041Tbag0RZnmIFbbO2FBNU1dbR3DBPxSz4c//ulf3Mays7FfsSGfogjE9fpIp4Jc8CrXh1+sLzNmQMrikL57PyVwcSD6De8AXLYSargn/8ryRoDi9FfF5IqLmco5wG1RY4nRadvC6WURlO/0c2LG8SNpucDpnG1iANaZYwJT61E/qvwEUnJ0FifAQa/ujHc2H/+/YiGaLlPOr3le/vVqroToo5a8fO8Z7LXGGKUXdXWAp1ObIs5keYLDHcrXDryEqcZAm/GdRi8UzokhILzL7nqHXshKcV60vL65KlJFB/powo8gCYmZHRafWbUVtRxm6Q/zhvyUB0EEmQTn6vwcLzEJvImMbjpMt926Nubp9aOzMFZMwzhfLJeVwj5xTC+V6dKevMfsFPLe3pCTzbwzk8R/iz1oEStHSsU/jx484exAtWb9IQiqqn0MSeAsWgmzYCcYtTdN6H6Wk7lvPFxteCW5F6+WNqmPju1TuGCSf8WAKBR5pdKaPEdo3ua1MopVK7mgdZOSa+JXwxyJYsjKi0c6+HhshgLzlPk6WCR9v/MTEzTVJJYOX78F/BSRXL+0zpadLI2a7yVaKN9dVAT+8tU9cAIIj0bO7d9dEyk5A/njVHENfPCYFj2VN9+fu979V2yKlQkLtsdiBRKGqH1tUChT4JaCDr8vGnVQ6ep55zZylP5SX4yWxwznPBGPA3JmMQhTPZhKVNAsUSTo+ooRkKXyCW7gBrYGn6gFnQav8pcj7UE6pNH/kgBDKe9RjuaC+8678kesU7OtfF9wOQV9Z/cV8YVrGzYYsur7LbmdUZq9FSe2UVhFYDgG2nNA/JjF9hNBE+072vz/33oYLQ0YXeVBON+ub+wNxcmz+eZ9GZhL3YFJZiSQbQN9ESAKJJZzB6PtecrN7k1cnKTDupA6IF+5hWKwMxN7O1hPdU+FLMEuxSQrUp+kCDUnW4uAUDVccuSNAeF7V/oxW2eVbN1L6XzkgwJ9bOOaaDbHatztbaFX/stYNsFRkhJk2R/pxqsYsSR+CmiqeeRUiAbrjMrDRJGHbDPc4nB0jPDOepA2wkqBdWcMk5S4KRjZebfrm9zegzN6FDfZwrcG02pOzw0NJWCT05Jcq1FJyI1XGY6k/WU49V+jwtSiBEvjFUHqux6bvjIeshNCFLMtVf2SA2OwqmtrYA3ikPwoJjS7C1+UBtd6dfYpDRVKK4qUdkBnh/sbo4nZWUWhQ7veKibyUG84AVFpmWPQA6oiQ/oktSv4gdpzehVNgf1jJh2qIGaanVU4MNe0WU8GukbJJVEJIXLmkOL/+t6eShenlkZZZ9IHTIpmWZ0IQzxtvRIcRBUWsHnnw1gHfI8cI5wecaDQ81PGWmmjz1ybOUQvC4MqH X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e802745-1da3-411b-8c4d-08db81c1c0fc X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 03:48:57.2114 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IjX0iRPltM6uKiGWp5O6JhgYzOu++rRP41CxJO1+Yl62ZmCPSb55lfsV8kB8FOYHvcBzSXp8Vv82YAfBDV9s/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4385 X-MailFrom: frank.li@vivo.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: XEKXQQMK2JEKI7SMBAN3XYRG6ZHUZ3O3 X-Message-ID-Hash: XEKXQQMK2JEKI7SMBAN3XYRG6ZHUZ3O3 X-Mailman-Approved-At: Tue, 11 Jul 2023 14:21:25 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- sound/soc/bcm/bcm63xx-i2s-whistler.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sound/soc/bcm/bcm63xx-i2s-whistler.c b/sound/soc/bcm/bcm63xx-i2s-whistler.c index 18c51dbbc8dc..c64609718738 100644 --- a/sound/soc/bcm/bcm63xx-i2s-whistler.c +++ b/sound/soc/bcm/bcm63xx-i2s-whistler.c @@ -225,7 +225,6 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev) { int ret = 0; void __iomem *regs; - struct resource *r_mem, *region; struct bcm_i2s_priv *i2s_priv; struct regmap *regmap_i2s; struct clk *i2s_clk; @@ -241,20 +240,7 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev) return PTR_ERR(i2s_clk); } - r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r_mem) { - dev_err(&pdev->dev, "Unable to get register resource.\n"); - return -ENODEV; - } - - region = devm_request_mem_region(&pdev->dev, r_mem->start, - resource_size(r_mem), DRV_NAME); - if (!region) { - dev_err(&pdev->dev, "Memory region already claimed\n"); - return -EBUSY; - } - - regs = devm_ioremap_resource(&pdev->dev, r_mem); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { ret = PTR_ERR(regs); return ret; From patchwork Tue Jul 11 03:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13308876 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 119C9C001DC for ; Tue, 11 Jul 2023 14:23:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AF987E89; Tue, 11 Jul 2023 16:23:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AF987E89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689085436; bh=MfB7IQbq0Oj4m2i6Hy8PFFdyPPMxVlmwbXAjnNAc6ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=YH4YsnQ77A5tXNMOmiRBKbBqjPzrfOn0AIGuhQeKv8Y+zg0uLkbmrYs7ocgsVonfF dFFp1MBXJaBqKC2GllYcJdh+ZGiHI5/AOiimZk9eWt7th6axtTHF05TAz1L0zMCjZB 7oLLrVJV1Py07na330ENUSJJ5B/WmnM0j52/Dd3s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F9A6F805AF; Tue, 11 Jul 2023 16:21:38 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DB78DF805AB; Tue, 11 Jul 2023 16:21:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C6B2AF80249; Tue, 11 Jul 2023 05:49:57 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::72e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 11240F800E4 for ; Tue, 11 Jul 2023 05:49:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 11240F800E4 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=EKQDZ3Dp ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQKeFfyQAokp2A5MD1Igfs932d2zzr52hHQWX0cwt6npVTUWzvZEhxs07Da2WPtAvWgx57JvGojBdQ7t4DWHyuuIMdybaCOXv4EkokjN0wfja36oUF0/LTvy7uSGqj6GZao6JT/ZGRF0I9WG8hqCJCznDSdo5rx2BH2X1W7KSEBBy+2dU5z3r5X7WYg+DhLJ5rTP3U8kmyhX8vV1ZZRcmL/6e4Gny3+PQ4QmTDARLuJWYBGxUzcCOA5PQki095x/s8mk7q2TikOq10JhDH0/csYABVvXnzkchJDFkz/V46SBNldq+q46hPfk+R+0my1Yhl4yR8/nrJDiKUVlGBnvOw== 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=bYZMZaULZaSNJm1d+jD+6WoxN7c1KwymooFZolcgcD8=; b=RPKCdTnMczii2f3/BVivt+5KlEKcRxi0q8h0Tnh2tpZ0UWkmPZdmq91l1YQx/RerE2W510tISE3BjkBSMo/2P72w87Rf18QKUNl1X/o1CYz/7Ryw3qsanewIAqr6cuKl1zx6AXgKyxmdTG1fO6vyBQvKQeekBKeNaTpLuX3bGbU8lsv4N9cN6niI7ZANt/Gw02ldmMvHbnopDa3ML3cZrbSjQtB6aCY8IGDwA0OzCShjNk+HhCA837BCMS0TYHha5Ye9RiMa0H/X2EClcmlbZTmBS0SFdJeH4A69cKZtr6hGU0cLnM0mkVFDFydc99awTigbtxoeZTElbou/Q4xG5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bYZMZaULZaSNJm1d+jD+6WoxN7c1KwymooFZolcgcD8=; b=EKQDZ3DpWdcCK9TeVdIPoDex2sSZecqOta4ZQ0Pca/FUJhNKq8cCem/j36X5/qzzn30/O9JaXuSo8nfurtlcO7lLblNTFyoXK9vN9XL5JciOi3rcGqRHId2SqCYV9FU83hDOgFWgE+yzjxznPJRy67ms5Xs2MLyqf0xz3KTs/QDVzZJ30/h8z54GBTA1QiyWmvIY401yeOaGB2dCGWgW688fPealVxtMcsDlbswzdtzrnqx/lThqeyjzFnZ6DG6gSQMM72FjzOkue6tdBxXtsb48LNPhtUelNHHbkZI+WK5/BpBsTaCpXoujTkgHV6TToCnRGkX3y4qEdGBs9r82ng== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4385.apcprd06.prod.outlook.com (2603:1096:820:71::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Tue, 11 Jul 2023 03:49:00 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 03:49:00 +0000 From: Yangtao Li To: Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Yangtao Li , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] ASoC: ti: Convert to devm_platform_ioremap_resource_byname() Date: Tue, 11 Jul 2023 11:48:42 +0800 Message-Id: <20230711034846.69437-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230711034846.69437-1-frank.li@vivo.com> References: <20230711034846.69437-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0038.apcprd01.prod.exchangelabs.com (2603:1096:4:193::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4385:EE_ X-MS-Office365-Filtering-Correlation-Id: d4f08620-1496-44db-8402-08db81c1c2f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WJGTuuwEvjq3TFm521NuXM5md9xUXvfglMkB4AmL53pM7Opyl31878ntLLcPgsYKh8k3+N3wHuW1MO11VLz2Re+/GXhV3G1X8HNJnKUlLnHh//gDPekyZ+aIQuKIDxak/ebQOWSOD9x4mADJww0yFAUkwSXfIO5BOJzuaEDjVWJQJaowuCxucg3r74gU3tRJ+sE8wlOp+PKcE/UEQ6hZyG5imBYX1YeHG15Wppt2qKzN6v+CdRyI5AidQBeVMONcsq23Jz3KJnTwDDSBmBQmSZbRpp15T3t3NaeKAzCUvllPDNxXaAVTLMATREpaDeQEJk6C20B+GAbP5Qvf2BOrVKYYUic0RpF6/1PzVSaYcheDUKRTvFMcD/0ziofvue9A/VLKNNs1cRMNaQ1C6JCDgJOOwqMReV3r2Jrdi8wNCjdYh5AhPC3YgT+3KCMDdEs5t7LKdwz7AcCdaN6hFhUk+7kWINtIlOpywX30ZgMWG1p1GuqvQCVN0Ge7juw1Nm6P+H93PlwNXrO9KTEwimxqgcHormhzordOqGZsLc1PgC82auKncw9JZ4uJAelpFI5P7fQqi6XbRro+bY+1qa03VGtAK3xSz9HOBf1+P8fEln03+NdUKNlg6FtvRjBKQ/7/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(346002)(366004)(451199021)(478600001)(4326008)(52116002)(6486002)(66476007)(6666004)(36756003)(66556008)(41300700001)(110136005)(316002)(66946007)(86362001)(6506007)(83380400001)(26005)(1076003)(2616005)(186003)(38350700002)(6512007)(38100700002)(2906002)(8676002)(5660300002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N/IjbmORQ4kgxDMbaM9DGIhuA9F7kGQpQrRMMZZbC8TNZRUy1GzucN0vppqEMq2ZqOm/78L+wuRYjml8QVwzYZtXfDSz+hKBTcbQWA52DBtbWx77bscpTJy5Y5IoBFz634k3UJM2SzAtoZ/VSrngDqCMoiB41Lll7IgsdTz06B82jAJfAZ+ZXFURag1TdHhjxrMcEMAvnHogEtnJm76kVi6gSrmnkJ9Ki9zAZfXhEC+Ff2VnTiGfzK+W/MJLx5UcMX4Yy0Hpntrsh9SEol3ag63fYr5plf1hQvkiQGWRu0rOHLmRwISiMAAQqTGAqsw3qqoVrz2Wl5g0XjhCwqqjio66B8J24L7ztuxIqFHrUMAGdoNm+3x6inrsKKyxJgXkmuMUfJECEPHPKhD+36lL7OqS6X4Yo5zs8NRJxDkans5TURhJo8mXjbVmRk92F0Ruj5GQX/HAYGuBp1ZqdavHtZTg0kKwrkLl5JGLE/aOS1Bm7XbbSk/sp6NCqhNCowEkwwg7PoiH956RUk8p4Psqj/ZBxRXURQ6eIQXZEfJdcFy7HGjS3JQ1ufJZVe6h3VpfGKPlcslM2m8c5u24rBxlbEERSAZCzQsvNu3p60w9ca9ESiePaTxuMLy79nTkQrZkIIJvmxD3UEpD5P+zVGygdq9Z62DoyyVQCJS1iScOqyYqcihUmTanMQMsc6mD9xmKTRHnUCsJvvErulQt3P+7gMaC/J9rkwEQ3+oZHuglUoLosCP8mN6GB9Xi2dsAmNb1qW0gvB9YLiBza7DSLMQoizm+BQXhZl3IDqxJZT4VcmUfffe5PyizJdDp3FZ/5VejqCMj03moSnE0YCkOd3c9yO+V15GfJlJfIZPgchMesAsh63ZUrpjvo9PteLGCF7M+3DJTEXA5grHdy9rpDarwbd8iRyT44kTD92YSTEgxsAxwId2Mq4l1eyuFSgRqr5Wp7OMBVB9SAIbb7D56b7NiDvpxaSkiaiictJWBaEKdsdruzQH4iKHedoZrl8fc/+I0SpwqPZ4HAr2wkedF5mG0ai8+VY1BXIRKp8ZLiJyd2BNYyxa/LsrwXpQrsfhGi9kaSpK7rPTeHWNLEDj1hVi+RNSjL/J/A6O1DDMqB0LOZ51H3KAffrsPW0MkftZrTS5ykx/QoGgiSD8UHdpKD3i9O5+sRW9Kz2ZS9OZ49uX7msN05ogo8etP/v07fZT7d6+z+l5TGZSh5tFXnSW14kthBnVdgS3i+3x9+N1zKc9bl05bLoOEOhHlFD64Pq3lOE/dmVen6y+AkVLphPcpWPQRWR10ZD2LRMEF7K75BgZWaGjHNJ8UJv8kDE7F9ZgKIMRJ2RNIBrDa14xu8fuJvxOmMzVaCwPfZIkIq0gwd4G7N/F0vtpEvp0QS4kvavZHeEExcEkaaRQccd0uDZYbRDMUb/bC8xIAS66b1dZZvVS+fNMJRAjskNou/I7lviZ75E6CowzCAJ+YU2RjcVHy1RbSb3RzHiuS/K40SsYSnLkQ1JUx4Q+PcL3hCK8UZEFqd8yT2d+YXnbRzXLSHHhnZy/MVtxnQ07TIppJWkB0H8In43Rqov59KVerFa+/emQr8ibK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4f08620-1496-44db-8402-08db81c1c2f3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 03:49:00.4260 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BE+AeSzT45cSx6uuD0/6oetZhSm2D6kQs3O2z66TRgrqfh3tQcko3i7C0fN7idAILsDEl032R7Np29kIGUfFaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4385 X-MailFrom: frank.li@vivo.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: QESWGGOSY5PUPXSP3D6NNNOLUL2AV7CJ X-Message-ID-Hash: QESWGGOSY5PUPXSP3D6NNNOLUL2AV7CJ X-Mailman-Approved-At: Tue, 11 Jul 2023 14:21:25 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use devm_platform_ioremap_resource_byname() to simplify code. Signed-off-by: Yangtao Li --- sound/soc/ti/omap-dmic.c | 4 +--- sound/soc/ti/omap-mcpdm.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/ti/omap-dmic.c b/sound/soc/ti/omap-dmic.c index 825c70a443da..cb60af36dbc3 100644 --- a/sound/soc/ti/omap-dmic.c +++ b/sound/soc/ti/omap-dmic.c @@ -488,12 +488,10 @@ static int asoc_dmic_probe(struct platform_device *pdev) dmic->dma_data.filter_data = "up_link"; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); - dmic->io_base = devm_ioremap_resource(&pdev->dev, res); + dmic->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu"); if (IS_ERR(dmic->io_base)) return PTR_ERR(dmic->io_base); - ret = devm_snd_soc_register_component(&pdev->dev, &omap_dmic_component, &omap_dmic_dai, 1); diff --git a/sound/soc/ti/omap-mcpdm.c b/sound/soc/ti/omap-mcpdm.c index 0b18a7bfd3fd..35deceb73427 100644 --- a/sound/soc/ti/omap-mcpdm.c +++ b/sound/soc/ti/omap-mcpdm.c @@ -563,8 +563,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) mcpdm->dma_data[0].filter_data = "dn_link"; mcpdm->dma_data[1].filter_data = "up_link"; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); - mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res); + mcpdm->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu"); if (IS_ERR(mcpdm->io_base)) return PTR_ERR(mcpdm->io_base); From patchwork Tue Jul 11 03:48:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13308873 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66169EB64DD for ; Tue, 11 Jul 2023 14:23:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BF7F0EDA; Tue, 11 Jul 2023 16:22:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BF7F0EDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689085389; bh=hmfnSzKDfJvf9/WjbY3q9+nOZhRpRnUZ9y8JR4OGjBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DICf5QnDSgOntLxt9H220JP7OAO6UfJrLWJnhKTVPAilznz0MEImD1PXCnFglB+CR ay+O/aqQ7yvICR9I+FosBGoAOtwu9eLGozSjbAi6aA1cAym+zTz+j2SMhro9qST53Y +kpiYygCRjkikPvgmkpW1JcYGDyDhK2R5zZv3mx0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3FF67F80557; Tue, 11 Jul 2023 16:21:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D7952F80548; Tue, 11 Jul 2023 16:21:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39CE6F80290; Tue, 11 Jul 2023 05:49:19 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::72e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EEDEDF80236 for ; Tue, 11 Jul 2023 05:49:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EEDEDF80236 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=EW2yvQCW ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YcupD1CMOw/QgKpeQTbJm/+mT+Xo1aEwhSTNo0/sfOu/TVHAFgeNCMEfvkBWlgUapRZikIkHtsWFq2v7aNPoPw1JhnDDzEz8URXNj3DOqnsBNVDKIeGysc52wUKRTIGBgRad41bhfIf0Sd6n8Ksd2Zlge4K55j1BfBF2sLAqYFNh6zAYhB1VE/Van2vU+JsiJbcs7OwyWlziNVSxWb6ml7t3W5NKeCUHlhcWrEM4F3kxXo8+axkSiTgFRrTNdhZxSKfD3x3v81sA9vwHQ1wZ0V9x2MIjHf4i0f4S53OueQEekaKd5LpSIidwT+5/P66lkR01tg7VoUQUN9oqrOZxNA== 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=3uiMaQCpGxelaT3fKaDxDNnSSEZ6fsAqhFU64aNTykM=; b=OtShYY7cI4g1ioT16OBYZdgOOmUiJE+C/1rjYfwZZYjGfXf7nCnNHWVyhQ3EP9CqBHSGeJ4KYvjCJxtUyCYYmkSjsmL4WTyhxAuuNv/TJF2bDRbf6bfFewaq5pQIzgDCo1u5PQ+z6lmhuqMPr5uc3ci5VuHqtD8YzFXmybJLqct0cN/HF6P7S90OG9AbvVO26LuJGZFn854pEVpEHgu6qmhL0P5whWxR2x3YG54HaAKzVrxlvPMWZdyQ4UBMzbYHpMJ4McpHrMSgLKSSWbxEHdgH+IxISo5ga6naw2OhuwnpD96GO/engaJKnTHD4Aaq5BNCePrLNNnrrOVW4tWqzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3uiMaQCpGxelaT3fKaDxDNnSSEZ6fsAqhFU64aNTykM=; b=EW2yvQCWEdP+yLGLYuaWdga7U11GgagoYpeSBDE3PlvFnPodsK7GIGYwHvqSySjz2z7hVjCzxqB+mwBp1+RhWQWXGuagWIt/kGTruHwHv7+//eZCPIVuJDIrzqSbMlgFy6tzp0IMRk14j1N9xEpD/CXRhcKcYZ9co69s3K7VEP/z1HzdTz7BTm1xXEsInRh3wbDdqVEvBnHz0fjUl/zt93g+UUwPEpKCRmgZYidMFXCZm6GFaF9bBV9SYsdXG34FDLzX69GwHeaZYXJQ5jzX5cNtRCZtpjXmKPTt8tRChfaUQ0Kpm3xEnvjEoBlM1I0wrncvNlMS1cFLfOE9NsPQWg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4385.apcprd06.prod.outlook.com (2603:1096:820:71::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Tue, 11 Jul 2023 03:49:02 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 03:49:02 +0000 From: Yangtao Li To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 3/5] ASoC: mediatek: mt8186: Convert to devm_platform_ioremap_resource() Date: Tue, 11 Jul 2023 11:48:43 +0800 Message-Id: <20230711034846.69437-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230711034846.69437-1-frank.li@vivo.com> References: <20230711034846.69437-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0038.apcprd01.prod.exchangelabs.com (2603:1096:4:193::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4385:EE_ X-MS-Office365-Filtering-Correlation-Id: ad8902d2-557f-4b63-9c33-08db81c1c462 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xnPmvjuMNhK1RjJs3OfyrBUvwQ9Wf/I0K30RaOsi5nyCWqOGvqJ0nNpMAkX8ZqdTwEz4Tnvu/oPyzKuxlySlrprvxQx6HXf+mgpRr4yW28Gv9LdreJAOFB6TDiv3TdFJ07LnuKubwV9MozqEpdqIfGVQXHv5kmHoZ5+Uc5ZthsAR7llfdyKkvHqDnZsNndZ/J3C1MFbVQfTSZWKdH11q8kirvWBE2nTAsURDkftMGaVLu+YV5kekghg0dTXurEXbaPhGtQs2vrJysE+XlD5PZgEEctxWhV1IDLdvSdUNte94i9jzYL6HSrLjSgRFtOANDhA74/qJAjbn7AT3kK6GkFvYNNHXM5jd7Z0ELLWNRG81mYns9CKahHcapAIxkicIj8Kp6l3IkbkqzG+oXxwhnv0SF2iEWNNxZqyXKfvrHbZffd2wWtSIfsMJKwQ+2KAS/9P7UXDl98EXnXXoQvHw3kRUzQCUk4DfacsUar3aH4BZShk46jxAT3g8fZF9FdvF2XiTLJ7mjxVUnLh2RuMARbv8BjusLnqhZ67qbDfsuJdHsNlQs9uuIZtAa9R97B2jkHvRtaNb1BsM+w6JNI7/mYyPonRRpHG6hg0XHti6+Ui4tZGctk7DoOc0enhJLdaV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(346002)(366004)(451199021)(478600001)(4326008)(52116002)(6486002)(66476007)(6666004)(36756003)(66556008)(41300700001)(110136005)(316002)(66946007)(86362001)(6506007)(83380400001)(26005)(1076003)(2616005)(186003)(38350700002)(6512007)(38100700002)(2906002)(8676002)(7416002)(5660300002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y3EsrdH8cVWzJxoWEiApKp2inAVUw5VpQ8tHWhMdyoy+ZB/DXgbxZCGNkVCaIP5AJTnJbhxICuQMORfQ/zIzZ8hsaQ9x2qL3HsU10B06JINQ3fmnCFp85GDcp9HQPU5HSvfvktB9sfdeX0rniYSn7zoN84VRTzQYvDzungaUldgAh9lBWVCYYHH9snuQ65oHHc1FQApKN/183Wmv23RqUlFF+JPPgAbowvWlsy7mdERpLyHuHrdWyOLINcLxGEzcT95UEOLSGXV4SOVpCyiaJBYBt06TnXqOxzc0us+gwcUuR1QVynh8Xk+JU/PuZY0JBlG1/ZVp7cJtpWl0LGD4lMoc7egGqYQKofjWwtMBZajYWz9H7aGNCRySIkQUwwccrHpovFwpkNlmEaNvbNHWr6WAzZJ8gpU2krfxCDqkml4gSxz7dbGQWNXAH+CseNJTmGyqFXQ8ArCm2R/1F2Fr+SKRjX8BOVeRTm7a9tPs9gdbywC99/JwgR6BfLKq6zRG9n8nOr3j9y8cFWDH2R9b+xsIvOX1F8DU/IZIjtM4qgHljtfFcDN0KwuCUYhdLxpKqIrSzJurCT3hPRBwFs4LK9NrfSmCo6zXh/u/I4FSFlzhdNf48AEwZJBhM1dyuG92zysxJ3X6N+rCh0FqW5qMnvpO7eFBR8j0pbdv6K7BnH4Ih/oIOlBg7HjUWsE0Nttyxf5soxqFYqoCwoFI2Cl1SEwaZohHlqaqJcb3JPYUYZIWw11sJPj5S2iKNskggIy8ObFb/Q9fGOXKI7f8+BD5vJKXm4cA7gV5f8k0W30oCT+Au1Vn3a+g1qi9/5NeUdKw+SuP2dkZZZXQ4RanhHPdacGhMVfZRaNWZmmSojZIfXRBDxsF/Kq/nqLv0saXTWjV3BoiL3HNlXIJWsgQ9KKiZ6P30wUTMu+4/zp06brIFeAQmqI4qncpkgsWAtxPZPumbUd5ecTwn6nB/NxfBtY+Any92gF7j4aAiMgxqZWv0bGMQy6pic6j96G0MAZRkbc1UmCbWUc2/dJTNT/x8miUDMeM1q1dRFR8NeljfPigNm0c+8INXLfl9WaoH+KSr0jBvxJsGO16VPjF881m+wUoQVY79in64ybGP76AUHpK+6r0dcoDC2pfgr1SYa3fkLYeJOMIwWkg8eHwEuy81OhKbtMyzasN4cM6WfBeG2c5EbIn6GN0nSC1MK6zr09hlyIZOmMfjuN3RJ7FJQlbvY/GtCMqZ9wXiV3xgwiYBABB7+XTZJWVlkskqsQXkwaZ3DOzM2bazvdw/VYXsa7ei4RxPnsM8WcvIAPc//eNskY0yi+SEBjGS2v/SvHrejPvR1Dvy7SYz6h2qrcDtZgAhxF1SE2Eg450b//0u0zfvqrCec35rj78/7sCLZdxl9C7FMBJEe6/8mJesODprrYhHO6+xcosK3becEuGZWxK0OKO9mwUeYwVtpL5f8r5nTMIQbUSksSjZfGMk+isujr4yMFevf9Xk2vRLzx51zq1ZrRW2NHas9o54M8m1QGmE7caHXp0vcCb3gueqSJbxT4Bs/iRMpvRzMBD73RlelbHfmJoTmD8ihAY0N4T+d88/rZlHfbi X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad8902d2-557f-4b63-9c33-08db81c1c462 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 03:49:02.8553 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bOt1IqxjzbSrwYLx54LWv0mN9k14fiytfYb1mAMYgt9FhTdZrrf6rTfRNPvD8ug+dwjacCpPsdH6W6lHe249MQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4385 X-MailFrom: frank.li@vivo.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7MPFHNZJHGQXVQZU6KGX2QOZUE2GWC7L X-Message-ID-Hash: 7MPFHNZJHGQXVQZU6KGX2QOZUE2GWC7L X-Mailman-Approved-At: Tue, 11 Jul 2023 14:21:25 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c index a868a04ed4e7..b86159f70a33 100644 --- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c +++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c @@ -2815,7 +2815,6 @@ static int mt8186_afe_pcm_dev_probe(struct platform_device *pdev) { struct mtk_base_afe *afe; struct mt8186_afe_private *afe_priv; - struct resource *res; struct reset_control *rstc; struct device *dev = &pdev->dev; int i, ret, irq_id; @@ -2836,8 +2835,7 @@ static int mt8186_afe_pcm_dev_probe(struct platform_device *pdev) afe_priv = afe->platform_priv; afe->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - afe->base_addr = devm_ioremap_resource(dev, res); + afe->base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(afe->base_addr)) return PTR_ERR(afe->base_addr); From patchwork Tue Jul 11 03:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13308874 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15D92EB64DC for ; Tue, 11 Jul 2023 14:23:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0BF09EE6; Tue, 11 Jul 2023 16:22:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0BF09EE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689085397; bh=q7QwBlxYU6yNXZ6L8hldiQfPYCB4x8nJW/aOOwCssYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=G59FHzAjDyiuNyfHNHi5LvCLte7ikgrVhC5UeGJamSKfVocvhHcZMFXiS/bnrZFPB wY0ZUysmXyyXPStcVkDHCIOOw8UWjj3RrlJqGSOmTDopQYEz07W/eALBKfKAL4p9jR IdNJQYnjH479YozvpsiMY/0bHEBAJo/PLVdEVPjs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4EBD3F80570; Tue, 11 Jul 2023 16:21:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 838B3F80564; Tue, 11 Jul 2023 16:21:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FD41F8027B; Tue, 11 Jul 2023 05:49:21 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F10CFF80249 for ; Tue, 11 Jul 2023 05:49:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F10CFF80249 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=iKuXmrgC ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HiJE0ttvCRv6F5D1MB2aFs+6cYAyjmFEzZORLgSg9NZliGtrs5SOaExLsGbjbT4vW3h2rlV++EgJrd9m6/K7cKDWMsIGq5NKGqNsRXpdJ8WbDrajeMcxCVDwwtYzJugfXHv9DWIevkz4RGFVRa2L6lxP3hSLphmg/VBgdLYlc0AblXCHfpQzN1givFVx6csKlQdkKkok4Si9IgQBhZknXmUB6NA86v6PPphMcjPxqpsPkbaUistZ92SyOV6PFtS76AmhZFKTW0dghCNrcSewbvIoT0S6Kjm92PM50qBbgLqmQNBaUS1fB8ZSV/iRrUCwn9XDBDNJ+o4bpa5H9HJCnA== 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=Wxd2p6NIvmJKsDRggsqubjNkLWiicblbFmqelvcoET4=; b=S/GLb38hzyYhd98ox4iyLu1Qj8rafquYyeO9wDcxEW1M6/D2XBh5sf+8X507qbb2QGSt3ekNyz/3brUidT/dz1NSOP5tNIeRMCvK1+/3fQs8mX+wWeqINVo79GTG3pdXYlAr9/O1d0xya1JxOqOTSRjJSnvP1w79XyDhf9KMBLedtV3w8kgPEloVYBB/ZanlDvvTVv72Mzi5aXfge4bMo7e1+yUAIypWrGjYOnoX7SkXyTOb2HT5hzphUcX7yvAdcy9z//wm/md5yAkYIR/ud30b7K31EwOgsxbT91Dq2aQ6ucseSC6wjrH9tUFqoLWjpGyhx2I8/TwXR1xKOpQebg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wxd2p6NIvmJKsDRggsqubjNkLWiicblbFmqelvcoET4=; b=iKuXmrgCYR2TkO9LjyUo90cssGTSkkluC+YE5HCQnfMnWrkjwyCujvNTXvvP5JuPA8PBsQXDakuE6TiyL2MtFA3fUTnLDz0z02JaTo0GUPvJdwh8rLBUWsxffsuOzCvHfHPtkSni1ZZYcA9UuoPX8F0K1XOiFYG66wTCWEx+MasLhcMJG6XwDor+Ucx3SpZAtsPV97khLykZXNVQlWX47sTvRA6DztPvRbK/7RwUd2y6GBjUOK/8AzcokF/OzM3rwtMNVZUCa0XZ0tOkLBExsOx/KLaYb1HT7Y7tggrcQrbDZ/m1wI51Z+zgNtIHd4I3JIAm9ch3OwZboh+cMYeAzw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB6595.apcprd06.prod.outlook.com (2603:1096:400:451::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Tue, 11 Jul 2023 03:49:05 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 03:49:05 +0000 From: Yangtao Li To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ASoC: pxa: Use devm_platform_get_and_ioremap_resource() Date: Tue, 11 Jul 2023 11:48:44 +0800 Message-Id: <20230711034846.69437-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230711034846.69437-1-frank.li@vivo.com> References: <20230711034846.69437-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0038.apcprd01.prod.exchangelabs.com (2603:1096:4:193::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6595:EE_ X-MS-Office365-Filtering-Correlation-Id: 5056e61b-e151-46f3-7b58-08db81c1c5d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fv8vsospZL47Lodqery/NvkajvU90x2vwThvbfpYXwDONUDG6dc0AUDHFV9sKV/c2OQ0n6ABZi7ZA747PG0ZJTwBpqoSDE0l1jOqZtI6gUbnlPaW7oBonmEpiUqKxff5X9aEaF+XfwZS3+r+FgsTgY8F7OR1/kPJnErtIuA8kJbp+44ywWvnjMpao5VppkZy1loFcqKVAfhafnkduVBxNfxVbHrniNo4Qzrbhcqf3DJmCfcK1hASCwxYJyE/QGDRl39mYphQakVvaFV5O2ilxoItinKCrJcfmJW63TAaoqZhgWUxHvmmKESuaFiNOCGidgdAIniDdlPdF60VkQ3chEV70YmSNLnwpWwZtY7cvgRyjf+cKbsWCY4U5iH1W3mObKE/YV5xHIpg/CZINNXdCpRV8crSkzLRQl3VLLsGkWDIGx3Be8Q6yNaLoIqPNW2FjzdrBni4LCGzEq+SIw1bMPliB1jgKGN+FynXntWcyM4gKtP2ROdMoikVy8RgKPh6TrKKWQVht3srI1mQAW5O9ojqP7s1LyvNUPkLqwM4e05kxk+RyA+CZryeGU5SvWzQB7/nSTR4CB5kxAtLeCodk9uwjJ9uptX+xyi86MYlM2RAZTKvqkSqBisILxACvKeljUXDrQvprcKYjdjExdDLyA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(396003)(366004)(39860400002)(451199021)(38350700002)(38100700002)(86362001)(36756003)(6666004)(52116002)(6486002)(110136005)(478600001)(26005)(1076003)(6506007)(186003)(6512007)(2616005)(7416002)(316002)(2906002)(66556008)(5660300002)(66946007)(66476007)(8936002)(8676002)(83380400001)(4326008)(41300700001)(41080700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FRpr22Xc4zRJVCE1uVv/p3a5W9hoWBZIKfJ442cgIZshdRBJJmfnpZPF3Aaw8HPAUEZJ/UllPBJBQp/bkCS7MvV55AbhIN8pzoxoaCGcoOrsZo03q/21CzmKvabqBrgGbSDtnyozEKlvfHeamM/nmNHs6K9XBz3K6VX22Lf6FyiGWokDQHX+LsgZUA8F7IX2n3oXEchL5odwQIlV0S3SF/MmVUJI+UMvIAHnulP8QroAdL8f0vag2HsihAT/uOuv0M4EBN/nu7ZPg84GXJzaXh4W/gbRjiFLoQdoEYpgpRV3MYGmrYdJznlwMSZ24MTS+DGVJ5uIO5pEspQ0MZT+uZ/RwyidJrtoaOJOosCp31iDYwNn8yrK6BdJrhm/EuyQ/hGFuPk4NM6dLxrxa/092o2GZ1BC4/7Jc9U/e4nPdTzuTgktDVuTyFT6RynOh5G+/I0wHXEigygrp/HdPt1GAnCfH1BN+GtfIhGCrKEm1zJx6EVtzO3I/0tI6Aicj8PQ8hXN13Y9jb5/HyQlbZUT34eZqV1Jhp/hrKZjrbv6/jZK9ZpRCn3kzt6dEJjXvhFY5oNx72bxFiT4R212mK3Zf87/l5dq/PJnbzDn0rTuBKdGnRpTUTzqrmpiqN04KrtThlFDkDZQ4l/znZCOFHN8K0UO60PS1gNGK05eX3TqMwVTk5OCkhN5EQRlowiSqV9JY2aMSKDToYe9qCbOrfd8UhkxfD8pj+cauDms72WsfCGeNc+aE9oBTJQTzWe4cbUMxwYO6KoLqKRQ0Apy2Mq/D0LDj7buGsVYtsH2CAg/EP8hCuw1SgvPlZKTufFhiaEwyZFFBFsSNm3oqGZMwdNeXplTo0iBHGawhvOQ6+PYOQ9F/zT1rpBU3W1ue46j3XQreLE+ZhqeDUqr5n5ljOjqtpi6d1p1Z2c1mXiSy0oBQZ+DYs1bfN7Iv8au3V4PopSZkf7H/Ga+w3r7qS1EzD2KYOftcDurEeY6bjwc7dUEsYsEUqI6rC6g2FAW6+eTSBfn5NpM7uDn1Jaqa+BrbphdkGOrvyDifaMXLB4lexriOvdvaUjamt3w6UezlAeUUIfI/iB3WULVpVQ+hXWEB/PlFL8vlCxN/PuK4+2mc3kSQzVZA9w06yC7thA0YUv7a9IiXO6X3p4IoJI2pfs9FTqLhksW7/z8yxAniRGRNc+94XYiEiQd0fkHOBB4k7XRBr69mlprpgL0SvQLr81Rn5ERR2bWyt95BewGYWuFmtxNKovMduE9ZjQn+xC3BtmhF/bRLR7N2IoFi9A23CKhXuzEc4Gg7nNk7Yh0yaysWPbnwXYUMUxQR1nEx6YQJpceLit1hnV7Yd0mzm71ixeRtUbDg9v4Aq/IDQcf6DI48kPhFLu+EFV7YZL61h21ZfsI8EovnE0kFYGm4r+WQyXfdSA5nsQApNAV2nsD7K6OJks/heyfwB/IHYieKImyX4j7OqlcoeZrJMN4dxauLgQ883toH0MnYJbOTJ5WvWT5H/+AO9kzUROzmrAkjmpxpPNuSMC8bl61VVda6u31Q6IqwNDgYW825h5nYEeAB3d+KRw3mU9mB78zo8szjgvTDwlk0Sp8 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5056e61b-e151-46f3-7b58-08db81c1c5d6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 03:49:05.3595 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c+Wt8n14JhDsCbX4m7VVIawaM2IZSJzdelDZRQtqLdIWVpD4blH5iYQf2jdzLx8M6FQnbxKjTUwsJDNomi5sFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6595 X-MailFrom: frank.li@vivo.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 2DB7COL7PSODQAY3QPHAI4HEZIDOUC7Q X-Message-ID-Hash: 2DB7COL7PSODQAY3QPHAI4HEZIDOUC7Q X-Mailman-Approved-At: Tue, 11 Jul 2023 14:21:25 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- sound/soc/pxa/pxa2xx-i2s.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 3e4c70403672..10636506b622 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c @@ -370,18 +370,11 @@ static const struct snd_soc_component_driver pxa_i2s_component = { static int pxa2xx_i2s_drv_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + struct resource *res; - if (!res) { - dev_err(&pdev->dev, "missing MMIO resource\n"); - return -ENXIO; - } - - i2s_reg_base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(i2s_reg_base)) { - dev_err(&pdev->dev, "ioremap failed\n"); + i2s_reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(i2s_reg_base)) return PTR_ERR(i2s_reg_base); - } pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR; pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR; From patchwork Tue Jul 11 03:48:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13308875 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDDCBEB64DC for ; Tue, 11 Jul 2023 14:23:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 98C5EE7B; Tue, 11 Jul 2023 16:22:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 98C5EE7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689085418; bh=EYp23IrejKuLgbxo/DY9LA/AJs+RnnQXxnN5Z5Rk1yA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FcWfOQu8GdAHjCAXjYfrAbz6tcdypNSHvALtUJ+iwe4Wsgqk83UfqqWF5IOvUk9od oYFszkpyBIQtXh47GgO9URbikWaLFhOnNHmQAX/6blAxGrg0MU8OAuVdYvC+cGeZIc MqOIVBp2bDrnlVN/yqL5+s2DZlFlEEuDpDsWX71g= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 32541F8059F; Tue, 11 Jul 2023 16:21:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9EBACF8057D; Tue, 11 Jul 2023 16:21:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D22B6F80249; Tue, 11 Jul 2023 05:49:41 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 35B51F8024E for ; Tue, 11 Jul 2023 05:49:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 35B51F8024E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=vivo.com header.i=@vivo.com header.a=rsa-sha256 header.s=selector2 header.b=Ft24zTR4 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GfhAc3AJ/uEIXuvyo++ytr/JtGLi1x5l/SITvqCycyNqXW0HmKCqxdGlgK3A//TFFyel+rSmCZpCNJhE/TjSyjHGbY96R+hAQH+/zMTAYaSf4cOpVbjenEOgI19YcxRsFn1nRGIBWxZyNYOqa1mRmLvPQcDaRHwETSKGxUjszp4XTIH1VV9CykztQql0BXbEDyBl7GzOffPnX3zMJlCv3eyn0aP6KLYYMNQUPpXQMIrgNTPB+L8GnK6Zek6dVmbKfZozXbIdw6jfeufjkn9RZXhE5jpujhUm/rf+d/3plbhdPsbAfypRaN/Yj44fuMjaW7Z1TMHmaXdsFqnOuTniLA== 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=ILYywV7zcU/CuVcS9ZA6kjFhT2ZAFL1XcRgzE8tfcbo=; b=lGvmQULsHNTLybPjllprnl+ldI5Rz6or7CTantay/eYVxp5/745F5L9dkDlGSWPvZoJpHrdb61kOGzEFt0gDXAlPYJpcLxz4oa1FJkKMs96+rpBx+3NvgKByqHpbclIkRZURIeIpeEOUl9Lo99aLLfyKFYX2+CYTuocuQE5icRgFR2TSQUsghxUx0yHD8fwWJyEqoHkB67EFCBoYl4GbcAgwKiNQq4I01XtFPSybW8T5FVbiVcjLKTYJFJ7Wbwc1Oa/JVwmxU1cpZP3BaN7K5xFPBPz5EWG7lcOmDyqLZS5+367O12xSD7MxFOK5owXNwLxFuMS/7bEapdnBgvpFpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ILYywV7zcU/CuVcS9ZA6kjFhT2ZAFL1XcRgzE8tfcbo=; b=Ft24zTR4kN4LGHurBdrXPqfv38K2wbAOGI2kgIRt8LAZ6ANJaefgPAXE+1klTJ+nMKjXc7oMSuADp1NZ/xu0JBFDu0Qupod88OwSz/JJPBhQRPFQmJM8dm0mkDrA+Vsg8khptvmPVtInI1ktQIVB3MyB1uHMjIWPPdWHoozfePj9LlbA0Hx8kOawB7H0xuee7ZXYa9v5984vI3Q79y4bGlG+kPmZg/a5LOBjUgx5MKTg1jupR4VB3iXigxIdT2DJVQ6g1XNPLUO8ocBQ6h+AE/3oygOPlihw5LCB1g7KhqFU1U4zftcfbJs0lSxJVs5dxkRQCREMYAsCKwfiQjoIww== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5143.apcprd06.prod.outlook.com (2603:1096:101:4c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Tue, 11 Jul 2023 03:49:07 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 03:49:07 +0000 From: Yangtao Li To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] ASoC: tegra: tegra20_ac97: Use devm_platform_get_and_ioremap_resource() Date: Tue, 11 Jul 2023 11:48:45 +0800 Message-Id: <20230711034846.69437-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230711034846.69437-1-frank.li@vivo.com> References: <20230711034846.69437-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0038.apcprd01.prod.exchangelabs.com (2603:1096:4:193::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5143:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a0b08ff-2489-481f-b7cb-08db81c1c74c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jqDtKtze0fIOziHRLZ5zIu2f6fStV5YAv84OQQX129aHZ56uo/IWBjAS8tEzo1k8DUWdFhxMyREwVA6HvSEPzZWVMkd53WLASgBMXjPP68v+n6UW1n89CUdX4vMl/99PdmNchiwzH0KERhwXHbk3Tqnir76XDdVnfOOWvK5HHMtqkSExUQcJ0vKevvINTF/fbgJObhf5LUbCTfu6ahJNKr9FTQPI4wKHLa1dMogeHdoV/ZTYwrtHS4JMpK9w1b4UbjzkRqA/MlDI04GRmtAujEMuRI/AXxPWhByIP2S8tnrM8YEDFwitvj8KQZrbwCVBjM8nQUw+9mmTNDYfC/8HvQQzJyI2XtJN0Mw4zoAgNyJnjSVhlGcKo7vUQTs3CU9pCKR+buc9S7pIKxlC3NwIjsRT1FGWX4NOv8Zvnjdy57bxw24tUU0uMMj3qUgQBO/v1WiU1V81aHbbRSB8o/1DviiB19d2EiXRwlO1FFeIxJG1y1J6raZNjclQKnzNU50TFwbf86rdPVzBCQl4BGgY9dYaOQU6pLGXyy2qW/k8pDgJpFYSvhrBjWOGbAbB/joQhkQOoNMcXRrwRZF3k/vWFOnNd39pO7IgH3FuyaFE436kuuFyB8JjbP69gvCSyv2t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(39860400002)(366004)(376002)(346002)(136003)(451199021)(110136005)(83380400001)(1076003)(6506007)(186003)(52116002)(36756003)(6512007)(6666004)(26005)(6486002)(478600001)(2616005)(2906002)(316002)(4744005)(41300700001)(5660300002)(38350700002)(38100700002)(8676002)(8936002)(86362001)(4326008)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CPMYy5vU0w6vxMnhIXZph3eqttKAjpgq8YUtRoOsu+vXCp+magBziHG3oLJ9On6kIU7ItumdfQ+qERvEIt+5lSiD7//U+BKZT8VEC2ICgG7NtMgreAILjX6MuRqWjuG7+FMbcx2XSLiZ38J2lcp34+AmiPlTDWhLGOFLGOpz23/WunosiAB1XqRP8aKMfUEHpmiaEzuPC6MDwYlcaZIPtCRiLNscl+q/+8qQSiP4JUG/BvemBdBN/z9LN3zKCJmSxHITRSO4TIoabIGxqfr2WzZxOdd3ujD2yZMoEqWingvT/TDzPqkxTwKgEOWqhiZh7Sg8P+M0I1L0P/9mDx5++iAu2QMlDk3pMPuoBLoRf2gEENFxb2IAiIKokny7Kknh/+CfQLMTaFWJNkA2Sxs8OwsZphqx+rwdPE+9+2Koz16xBAfDJtuSbN+iJg8rEU34EjVgfbmDSv52FjixMngqmYwvDcGc7rKDaMGbjtTm5pxiNMqDx7nlAqtvQG1kFHUNwwgLQ63l/85e7w9K6tqBH2v+5QJGY1kL7bF7H/40SyUmE4ieCvyuj/qvzpvIWQ9FFHBa5RsTpsfxGXdQdnDuDfgwjd/UGmaHedU84W7eOM8r4dQwaiBI8u6lO8bVNqcMKpM8oiRQ9vNyuxhbGisbkblkWh3hWr0eMAlRYaASw5tzzSQ8ZXH/GcKhUyLaOH3BMp9Ex5+hATt5sv+NPCoXR8gP/3dSJJZzR6mtUt7OlFN8JHyFej94IoNLzsMLnFNRTF6+52UJjB4U0KW6IFNZ7dpARf7ADytMT6+DDNy99x5UpX7wOnrb510T5G1bSW9TZVZt3+y3ychLyH/NAUglFW2lqhoITqpgJhoZah9/96CoUzaOYeBpKMOf7RrIEys9dSEvlXJ7fUnmE9fQ7/TAGap4oJ0UMkkdufJH/16eGMRGiQCWgxxwZ2oMxTqg/ojNzbiipt7jFNExfSsvf9g6VemKYfgg6XY5jpb2iLz8+ghlxk+6jRRYR/gShTYIg4UjRYUR00dhootMOZ4KhDmGGXBrr/RFH6nCQEvBXL1Tj2MWFzkCd1G+deEm8rXwEx+ts5AUc1hM60nIMDWSTO1sXDvEOWzT6IrtGsOdHD8p9ntRerf33u3bpIb8tkw+aCC9YfPKuVKK1H1wgLqqyS9jOrN7Jgx32wRoV7EhDIm3KV+bDEQ1SwZUKMgKB0Rg3AINF8pr+uooaMDzq5xqfalq9rFSPzcNUWCLIOaRfWo8gZtMri3e5lfhxniRt09XL89agBMs72LDMT8HWRr20FQr9xEHzQ4P7lQ7EPiZKSmSjfMXsf+mc31zrzhcOWsXNpxK6/H5ECgSGUNvjgicHirm+n3F8Zns+6cJrdQj+xZ8cY62eRLnOisp493IwpNNwq9YVQpj0yZ0OYJFWV3uW9Eghq7o34LeIqXCiKRAiVtF5sL+2vRgw77MFK7I/l36VFgpG2eXZShVfmsdN4d9fjnUtFzL1sIa7LdR1AF1yS/bg+HQTF4gTN9FRMHu7pduLfXdZf9PpB4yvI2/0KUDt3fR5/dEqVJbfoPS51Qd/czvspwkmCW8fKpO7/U00HL25PGv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a0b08ff-2489-481f-b7cb-08db81c1c74c X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 03:49:07.7425 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Pu6Jccod+97WtZv18jji3rhRzVSX2Ta4B9K4AgES8uWNt+8pnRCZ/pLfTSFoAECjipnjwfvppyI/eqiseYOppg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5143 X-MailFrom: frank.li@vivo.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: VL2K45YJUVMMSQQYX4QZXXGJMRLVCLIT X-Message-ID-Hash: VL2K45YJUVMMSQQYX4QZXXGJMRLVCLIT X-Mailman-Approved-At: Tue, 11 Jul 2023 14:21:25 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Acked-by: Thierry Reding --- sound/soc/tegra/tegra20_ac97.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index a4073a746ae3..60e7df41c64c 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -328,8 +328,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) goto err; } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, mem); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(regs)) { ret = PTR_ERR(regs); goto err_clk_put;