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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118230 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp226116vqm; Mon, 10 Jul 2023 20:56:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlESVcTFtbML29maj5OUjyQQSAT3lRxLSfewZc2KBZeDDkO0WwC0RBCEmpocKE2ctaAKGvEs X-Received: by 2002:aa7:d8d2:0:b0:51d:9130:3c54 with SMTP id k18-20020aa7d8d2000000b0051d91303c54mr11366790eds.26.1689047787446; Mon, 10 Jul 2023 20:56:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689047787; cv=pass; d=google.com; s=arc-20160816; b=CkvWntEVrHoBxX5zlQ4WmeXpTtENilU6OPzocK8a5iXZMJD8pMnItf2rcH8zd7g4yi jnmgx5fQcYkXc/wxdseuoBnDD9ek1LWdf+4BFL23yt8pdr27fgmGJzsn4TrEvi6hv9BQ qSdnIvF+iykC/dgb8XrGp2yKBaEheClvXBM3uMEWNyXyvW4CCJozEVBokmIYAgFu/lqr MXrlkgbMyYBifxP19YRFQ6IAufSSRHe4GSU7jye4W3FZ7HW+jfF1IVJacZWY50XR2EUE y198+fFh/4pocUQuDgKHAlreg2fhER+VOuzPwDV2LbJ149WwE0MN3K59mwnrr0ILt5je ojIQ== 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=Wxd2p6NIvmJKsDRggsqubjNkLWiicblbFmqelvcoET4=; fh=dA55Ud3Cp0uAR0W4iQaKyhxq+kbLLegG6BA4yFs83dc=; b=iD3TDmopaMhCCSb4MUkI2eFDz82BWvAFJwu5D+tSlcrVC0DyNs+LSp4FicIe0i+bDP 4xGRVzQsdZQhbSMz/UWnbxhNSNH3vQuEwlS6YaFv4bPtLyblHEME+U3/iRkHWz8Ed0sq 2nvotsLNN9qaOvaOW1aZZSmh+i0yBYeraBuqVDE5oMfeutZc9eazwIL9hBHrpGHHL7XF MY9N57yp4Y6utCeKnPnvoUtUmsyCYZcCOjQ/53k/wIS8dBHKFk+bdfwsUz4IG4r1QwyM LZ3lPfEEJ/5ELDUvEkLnRM+XdvW4l5GAHY5a8yczsdAWOhOgogtPgHXaejdf/WA0fcJo Vq9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=iKuXmrgC; 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 e20-20020a056402089400b0051e27e00a96si1061219edy.126.2023.07.10.20.56.04; Mon, 10 Jul 2023 20:56:27 -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=iKuXmrgC; 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 S230375AbjGKDtW (ORCPT + 99 others); Mon, 10 Jul 2023 23:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjGKDtL (ORCPT ); Mon, 10 Jul 2023 23:49:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2106.outbound.protection.outlook.com [40.107.215.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22AAE42 for ; Mon, 10 Jul 2023 20:49:09 -0700 (PDT) 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/092o2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OqlcoeZrJMN4dxauLgQ883toH0MnYJbOTJ5WvWT5H/+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-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: 1771094972454758893 X-GMAIL-MSGID: 1771094972454758893 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;