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: 13308090 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 370B8EB64DC for ; Tue, 11 Jul 2023 03:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lZzmwnjtOOdY8aAwxOjXILSqStfIus3j48vLzQPo+Zw=; b=h303xnSdVNO7LD MxwplDNeDlqTrgCVFnvVEfxif3cDVTBvYnZtRIvBfhPk66sixHILMcZhhU4l1MdjfM8mw8kqmUrLF 5kKvBUQ9v57B5FmJb8Mb/QZb8LmLYiy+eYn6UKHZ/R0o0/kIPJNraEaJHv/SLFu804jnc6GuheKQO ra7a585GKKYq8ZQWisB9YwCrujTBiupvb9omi2xUECGxvY6UDmSrAZ8sLhMojImbDp8ssr+5IBb3d tNgP7G3/zelgXFuCd/tkXoZGFZoLOllJld2nn7w3NKHXDmqgjYcRXyUiWRDbsNDWa6guwEhNOzeRN hWdH0V4Bprz6Y7wgGr6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJ4NL-00DWUi-0G; Tue, 11 Jul 2023 03:49:19 +0000 Received: from mail-sgaapc01on20713.outbound.protection.outlook.com ([2a01:111:f400:feab::713] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJ4NI-00DWTC-1K; Tue, 11 Jul 2023 03:49:18 +0000 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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HfmJoTmD8ihAY0N4T+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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230710_204916_812620_25C9C03B X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13308089 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9B07FEB64DC for ; Tue, 11 Jul 2023 03:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wimicSmFhVpVbhy2fILGFu0RVX+iDtOzXOx1hzuWh2M=; b=Rz0o+x7RCmP09P /cXT0/b1fNEOQnatRoyqf6jK42XZu6Y5/ccHTn5jXCjp5D9csw0ETose6AkePfxelD3XZqIRoix0T ZlwTz1QSB31xcTbMOgyNUjn9LzmNIgGMs46tHLkrOk7GS6AyLnnejEea5Oz1iUDps0q2PObrApVV5 qCu8WFBI8z0FdtrAoSj9rVaOqf3h6A7IvusQMxiy3LhgcjSKBwEj+1DvDC2g3gx3IUrjKeOTbhqJy fAsEweO8cHLdA7YyYnicVK7r0q6/zGWNTxvvWOsTl6z/6ZqaW4Bl/WndbZdrUrBV7D84N1XpEILMU dW9/x2G4TKHcavOx2XdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJ4NL-00DWUz-2K; Tue, 11 Jul 2023 03:49:19 +0000 Received: from mail-sgaapc01on2072b.outbound.protection.outlook.com ([2a01:111:f400:feab::72b] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJ4NI-00DWTL-1b for linux-arm-kernel@lists.infradead.org; Tue, 11 Jul 2023 03:49:18 +0000 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+LsgZUA8F7IX2n3oXEchL5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E9ZjQn+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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230710_204916_814387_EE74E3CD X-CRM114-Status: GOOD ( 13.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;