Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp401026pxb; Wed, 8 Sep 2021 03:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAQtv5cFEmx10nz2R9qFT1ae/YYS+shQCdVep9hK1NQ+mklIjTdZVmueKMJMfiBlgfp3LT X-Received: by 2002:a92:7f0a:: with SMTP id a10mr2527871ild.22.1631098684627; Wed, 08 Sep 2021 03:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631098684; cv=none; d=google.com; s=arc-20160816; b=hY/kOwQSivFfTw1VzAPUciGRgSIhk8banPwluFJf9M7np2uGc4TrVkqGRPKkRaomQq jEexgaqDOC/Odxn36wA13TTKDmYaOh8UCwi7xgN3NwFfrSXEIkY3sflucUk3af82yh36 EbrBEBu2tZR4ndghkLi0+BEvVXiyKQJWUBsRodEqxRqnLci4bmJkrIXqM1Ob/lePdOPG g1qT41H8wXQReBUWQkxiL9/2+csgjOm3S/Jq19x6Nba2gadO0S2bK/vcEKCLodoaMnr3 FyIHzE2Fe9pLRNH0FH8cGfPlSA+AUnfrGG67wBsVGJCW0cb3W/GRxGl7iQsnuk+KSBff pnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=YCK5NuGSaqDy02qctoq3P5/KA0kSK0m0LNfNvK92iww=; b=ew3SkE0OR+vYaVMcSKZtAfd6k88u5/LWh1wvNpRT7AyL81XST33IR5nSc0Ro0LN9si 0fLI6MuRcUfMv/MEX4LfWPeulSXQ9glmUAJLHvu/YaTZOJ6G5vg8GAVDOa8FmYCDB19y VuvOM1reXuNU1U+DvXZHuY3Xwr+tHct3NrywhX89xMjENjRZDOzrSfO2sg7xMQutyDLC ohY+3biwP4lThApEridJKRErAULFxS4W8hna1AiqDl3uM2+w0ccsbTYl5Oj/CSMLYR7P pXxFZzd3k7pp6m88+xAeFaX1lIRppyZSXSEaaUmcvGTeqW36qkqN98J1cXPU1ZQctwXo Lskw== 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 b10si1793239ilc.151.2021.09.08.03.57.52; Wed, 08 Sep 2021 03:58:04 -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 S1349019AbhIHK57 (ORCPT + 99 others); Wed, 8 Sep 2021 06:57:59 -0400 Received: from mx20.baidu.com ([111.202.115.85]:39838 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1348101AbhIHK5r (ORCPT ); Wed, 8 Sep 2021 06:57:47 -0400 Received: from BC-Mail-Ex18.internal.baidu.com (unknown [172.31.51.12]) by Forcepoint Email with ESMTPS id 52528B5E57767FF86749; Wed, 8 Sep 2021 18:56:30 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex18.internal.baidu.com (172.31.51.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 8 Sep 2021 18:56:29 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 8 Sep 2021 18:56:29 +0800 From: Cai Huoqing To: CC: Thierry Reding , Jonathan Hunter , , Subject: [PATCH] firmware: bpmp-tegra210: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 18:56:23 +0800 Message-ID: <20210908105624.1423-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/firmware/tegra/bpmp-tegra210.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/tegra/bpmp-tegra210.c b/drivers/firmware/tegra/bpmp-tegra210.c index c32754055c60..c9c830f658c3 100644 --- a/drivers/firmware/tegra/bpmp-tegra210.c +++ b/drivers/firmware/tegra/bpmp-tegra210.c @@ -162,7 +162,6 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) { struct platform_device *pdev = to_platform_device(bpmp->dev); struct tegra210_bpmp *priv; - struct resource *res; unsigned int i; int err; @@ -172,13 +171,11 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) bpmp->priv = priv; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->atomics = devm_ioremap_resource(&pdev->dev, res); + priv->atomics = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->atomics)) return PTR_ERR(priv->atomics); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - priv->arb_sema = devm_ioremap_resource(&pdev->dev, res); + priv->arb_sema = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(priv->arb_sema)) return PTR_ERR(priv->arb_sema); -- 2.25.1