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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp226091vqm; Mon, 10 Jul 2023 20:56:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEBALmkccGFyURfPnFA+W3D98AeLOzfyNPH0KdTWbOlbctI2jDzl/OnTIKdg1llnRLQcGdP X-Received: by 2002:a17:906:6a1b:b0:98f:450e:fc20 with SMTP id qw27-20020a1709066a1b00b0098f450efc20mr21819840ejc.17.1689047784288; Mon, 10 Jul 2023 20:56:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689047784; cv=pass; d=google.com; s=arc-20160816; b=rk1hTSG9xa5nusEVEUEZvjR7310W/xnR78lrRia44YZDQzPewpzJsoMfq2eZLdPJDD dbLbmBrlbcm0NHkQfXX0DKkfCj1w/8QWaN3VHu5oxdJInUQn2GOz7Y0SBbCKZR0/q248 F0+YfbXKUvm+QdVCL3eG2N7QQtWhKuvXCsQCl9pbO94C6bdlqOO6KpKU0zveIDEoKKiw UsDhNkZ4Wwkn69k/F3L++JP6x1Eq6DcN1jZAi4K66YMUzuce0oMoex/1j86vqk1pTCn3 yj01eYCOXZQYLcX6MWxbz+0TJ3knjKVwzH2q2h/HP42qWHFZjAOG8OvTzvIpZEkqx+JA aasQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bYZMZaULZaSNJm1d+jD+6WoxN7c1KwymooFZolcgcD8=; fh=npBKMt9vvCIS+pWJdiEkddP7DN75bS0elHEpCayUmOI=; b=03vzKNdFqcAHg9nya26b150Ltcyum9J5ZMi/NTdhk0d/+jelE3Cl0TpE7K5ftQbU1Z UzneMoF/UPs2rql0101Z/OY9hXcI/+oUJExSUMrr7/oUEMQ902EAA+JWf7tIH+1JBy5W S1rO0MR5Pk6K21YRWfv0dorwZSpBFsdCmJEO//KIqICAwrx0RjN98cvuXKJIcwmKN76o m7XTDga7DD+bjzlUbUlO2amxNWuvNHjFKofZDxHUGTLIIXrDSFP1ws6w4IxfTG9pvSUO 6eewKpWFOygrK07JhC5JtxSP9lSYscTSgfcVDYzuPlz5n1LvD9/Pk75/MBYaSIC1iF73 3L8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EKQDZ3Dp; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg15-20020a170906f88f00b00992a9bdb0e4si1253815ejb.309.2023.07.10.20.55.59; Mon, 10 Jul 2023 20:56:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EKQDZ3Dp; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230254AbjGKDtS (ORCPT + 99 others); Mon, 10 Jul 2023 23:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjGKDtK (ORCPT ); Mon, 10 Jul 2023 23:49:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2107.outbound.protection.outlook.com [40.107.215.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463531BC; Mon, 10 Jul 2023 20:49:06 -0700 (PDT) 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/H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3hCK8UZEFqd8yT2d+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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771094969209102545 X-GMAIL-MSGID: 1771094969209102545 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);