From patchwork Fri Feb 10 08:28:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 55316 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp831478wrn; Fri, 10 Feb 2023 00:37:18 -0800 (PST) X-Google-Smtp-Source: AK7set9PSITwlyfHMcRJX0sZQzxqGW5tm20xfGm/D6u9AlMth9ntJ8KpV8O2Pf8PDLyiZbne/RCd X-Received: by 2002:a17:906:6a22:b0:878:711f:f3d0 with SMTP id qw34-20020a1709066a2200b00878711ff3d0mr20832078ejc.4.1676018238693; Fri, 10 Feb 2023 00:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676018238; cv=none; d=google.com; s=arc-20160816; b=wunTID3pViHfMy+rfypwwVDIXH1cF5zcqC4fWgf/Cay7HqoOXQbvZDueKbtuGV0H+1 lWu8tjYDdNPO9x6OBVEvIzWzYdThLcA87ND+rV7n+v/pctkh1AxnNxlh/x3jTT50vOIA s2glA3ggd6piOm9fGvWyqMH1bn2riecettRIg8WHEe1UYxY3M2fyqkGzIy45n5leBltT LRre3In0NVQbNwL3tXJDbrQbU0jJO0EMt35OO5PGUzSh/EkM/nV2ZGhYCafhNgsAudtm CBAwihF5eDz9zN/882MiRZlAltGf/3AsTar+C4UCQ8V6ciBIL3Dsu5OMYJZs8+UT8Wvc 0ouw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=TodTw9i7hPfqJOq+ur6FyW33ZUBJ2k40CMl0zkABtPY=; b=CTWQL4U/yeL0DqJCknNSq42oW8E5ivMyABpHfgKzFiT12KwmQ7/dytb7tZYbHMoEor wC6R4vQ7f2sj96TacoH1YD1wqFY6d3FYPWmj+JPcqcjm7c0C3/MGKTAQyf/JzFnTIP1r 6MIxgSSFDO8xbN5qZmeei2KYi+nW+jeCQR5vKZJPGXwXYTGzn2PbDd4xXOG3l64ki+GM ZEIN5FIcZpNV02PUhGsEdQQ/kdKHRyd2Sfdx/m7xOCW0MM9PLm0bIwmYd1CrLRb7QJOM 4vzSacstXFcJwT8sB+fm1O5W/cMMsIr2lTzdoX/v1oSasOxfmSGkEOSWJvf29qxljq8p BAbw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a170906020900b0089dcdd2c208si4403252ejd.921.2023.02.10.00.36.55; Fri, 10 Feb 2023 00:37:18 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjBJI2v (ORCPT + 99 others); Fri, 10 Feb 2023 03:28:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbjBJI2u (ORCPT ); Fri, 10 Feb 2023 03:28:50 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0340D366B2; Fri, 10 Feb 2023 00:28:48 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4PCn245V7Lz4xpy1; Fri, 10 Feb 2023 16:28:44 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 31A8STYW020026; Fri, 10 Feb 2023 16:28:30 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Fri, 10 Feb 2023 16:28:32 +0800 (CST) Date: Fri, 10 Feb 2023 16:28:32 +0800 (CST) X-Zmail-TransId: 2af963e600304908c39b X-Mailer: Zmail v1.0 Message-ID: <202302101628321403257@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_mmc=3A_sdhci-brcmstb=3A_Use=C2=A0devm=5Fplatf?= =?utf-8?q?orm=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 31A8STYW020026 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E6003C.000/4PCn245V7Lz4xpy1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757432500780784284?= X-GMAIL-MSGID: =?utf-8?q?1757432500780784284?= From: Ye Xingchen 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: Ye Xingchen --- drivers/mmc/host/sdhci-brcmstb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 0a19b7af1d41..4c22337199cf 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -255,7 +255,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) struct sdhci_brcmstb_priv *priv; u32 actual_clock_mhz; struct sdhci_host *host; - struct resource *iomem; struct clk *clk; struct clk *base_clk = NULL; int res; @@ -291,8 +290,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) } /* Map in the non-standard CFG registers */ - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1); - priv->cfg_regs = devm_ioremap_resource(&pdev->dev, iomem); + priv->cfg_regs = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); if (IS_ERR(priv->cfg_regs)) { res = PTR_ERR(priv->cfg_regs); goto err;