Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4521662pxv; Tue, 20 Jul 2021 05:51:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyecUeCvZjlpgtRbaKGb365fN9WaHCv7rzeq7fH9juJYJm/amQ3egKoowlLOOWG1G041E2M X-Received: by 2002:a05:6e02:198f:: with SMTP id g15mr21679772ilf.120.1626785500678; Tue, 20 Jul 2021 05:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626785500; cv=none; d=google.com; s=arc-20160816; b=YaKh+ZJcxIaa/fi4lOgKz1iG9SVzGJgUzK5LsVQTFtt4o4PBIAFP5ZvU/ujIIoNgtW ZvRBnkfeMnJFqtNYHmYeM0DI6W3cBHE4TV/DvfAC1S6I0CbbBIFz6Ym2zMpDZawY1DK8 LG34EgR1MVsfRx0qfCn8s+Ew24CKyIqqX7XIQZp9vDe/S7hQ2icW0dM/uWONC4KIjp9u IdiRfItBXBSGEIQpD7nOWSJdTcJvd5WrGamRRyMyUJcjrTZHXhUB9bprCOjrIheKunNB gsimXzSbYhQNf8E/3TQXVwRQjWXZ5TZjcq2AUezP2n6+Be/k8UQb5nx1DPe86NtONuvR vegQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Z9HFoDaGcIAb5x+zNqw+FYj4+qWInWDVhzhaUOIoN2c=; b=hWm/NxpPx6qRrkENEqasQrG8M+K93g4DcSOEtw3oKFXriFr4jah1/ZJbp3PFUvTTFS CT4P6lVxFxBIXRfohKtmz7om4MlVB9i6QFGYh/CMV2/rXrU5UAwsesdEfBNzaS0iL+YR HK6xTSCumv+Y1rADEkBoDsSm5q26aiMTKjVGtU8amMDSoMp3wB3KU2AbggVfZhskB4cB Xkq+C9ZfuksjHtd2ak0nhsMvP1uru1FFMyXyEJ1pLr0J23vFwWS4al9uz90aEwfaH5cS BES77h2WTgIVDGeZu+nkkn8gg4gFzzWqgZtQu17QQp9c/mJFE2HaEDRiMmzah937+HiI KTVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si23234875iol.42.2021.07.20.05.51.29; Tue, 20 Jul 2021 05:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbhGTMKA (ORCPT + 99 others); Tue, 20 Jul 2021 08:10:00 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:19407 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhGTMJz (ORCPT ); Tue, 20 Jul 2021 08:09:55 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.13]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee960f6c67aa01-3e2a6; Tue, 20 Jul 2021 20:50:03 +0800 (CST) X-RM-TRANSID: 2ee960f6c67aa01-3e2a6 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.0.144.134]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee760f6c6772ab-8f84b; Tue, 20 Jul 2021 20:50:02 +0800 (CST) X-RM-TRANSID: 2ee760f6c6772ab-8f84b From: Tang Bin To: stuyoder@gmail.com, laurentiu.tudor@nxp.com Cc: linux-kernel@vger.kernel.org, Tang Bin , Zhang Shengju Subject: [PATCH] bus: fsl-mc: fsl-mc-bus: Use devm_platform_ioremap_resource() to simplify code Date: Tue, 20 Jul 2021 20:50:50 +0800 Message-Id: <20210720125050.28064-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() instead of platform_get_resource() + devm_ioremap_resource(). Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- drivers/bus/fsl-mc/fsl-mc-bus.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 380ad1fdb745..472f0daf4271 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -1080,12 +1080,9 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mc); - plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (plat_res) { - mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res); - if (IS_ERR(mc->fsl_mc_regs)) - return PTR_ERR(mc->fsl_mc_regs); - } + mc->fsl_mc_regs = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(mc->fsl_mc_regs)) + return PTR_ERR(mc->fsl_mc_regs); if (mc->fsl_mc_regs) { /* -- 2.18.2