Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3525851pxb; Tue, 7 Sep 2021 01:17:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNHMeAtRMaFcoFXP4P6BaegLJrpAfSIEpE73aAanVFMjxvLvrR78uM2T8sswbY/cFSkZZU X-Received: by 2002:a05:6e02:1a6f:: with SMTP id w15mr11195046ilv.281.1631002667145; Tue, 07 Sep 2021 01:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631002667; cv=none; d=google.com; s=arc-20160816; b=Ztz3/7dk3I/him27HmhF2owhKkoSoC/etTvupx7jJGFehodgG71oKf4P+hY1M0+4Hx NqnEmoIP4+M59m2xRmi4u5Dvkbfb79YovsbSORBYgtjjwwHWW4wTqSzh4MMh6trkm2UV hsh/6VezmXgsfrzUm1uQPEQrlFBKv668633YXJrQRsrsAJzi2obAot2vKFLbLueJbqWp 9+2O8e1RGt4byTAgehq81+21OKyh+U9fpHdkQr3WLUa8Bn3Dlq5z66RI6HoCEp5uHKpl 0Fy4j4twlWG1zFkuuk9M7HLB2HfDuKtZcEVJsf3dcx3uCuSt914aboKg2fpmFmPPr/ga uXDQ== 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=lt/spx1oXVtvVFSagAW8r1Yg3SWRIoRUUyUXjCvCjt4=; b=VfUZlB2l3MRITSKgmVHolHfrjfGd5usjqrH1ZaKMjRtmwGbyoWNf+5uTgspG/CqzDd w97TGLb/RWOhKeNJqYcPYX8Dp+T4ceVuv26cZjbcJ3kA1pC+mU7hRMP41idGo8wbYDW0 Qvgl04bitiqRAvtuecmAOS0rVWfHiFSESBpUrdCA4wonyyb/kBZ3ChQLL9ro6YbAmvEJ MDwQc0bGAhIDkz1840GtkEBUIz3pSmv1lGlTLPCShIEGzmIMbiyi9k6VmKJwkn7LSG5J lPNHoumPTZLdi4vFTv9wAf1Whaefce35IfyelpB6kLGdDxM7pF94BD02DdDqGuDimhBx mTqw== 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 f7si11713983ila.78.2021.09.07.01.17.35; Tue, 07 Sep 2021 01:17:47 -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 S240520AbhIGHnF (ORCPT + 99 others); Tue, 7 Sep 2021 03:43:05 -0400 Received: from mx21.baidu.com ([220.181.3.85]:43980 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239823AbhIGHmp (ORCPT ); Tue, 7 Sep 2021 03:42:45 -0400 Received: from BC-Mail-EX04.internal.baidu.com (unknown [172.31.51.44]) by Forcepoint Email with ESMTPS id 8A05E2706B8E4B11C9A7; Tue, 7 Sep 2021 15:41:38 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX04.internal.baidu.com (172.31.51.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 7 Sep 2021 15:41:38 +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; Tue, 7 Sep 2021 15:41:38 +0800 From: Cai Huoqing To: CC: Jassi Brar , Subject: [PATCH] mailbox: platform-mhu: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:41:31 +0800 Message-ID: <20210907074132.2349-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-Ex09.internal.baidu.com (10.127.64.32) 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/mailbox/platform_mhu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c index b6e34952246b..a5922ac0b0bf 100644 --- a/drivers/mailbox/platform_mhu.c +++ b/drivers/mailbox/platform_mhu.c @@ -117,7 +117,6 @@ static int platform_mhu_probe(struct platform_device *pdev) int i, err; struct platform_mhu *mhu; struct device *dev = &pdev->dev; - struct resource *res; int platform_mhu_reg[MHU_CHANS] = { MHU_SEC_OFFSET, MHU_LP_OFFSET, MHU_HP_OFFSET }; @@ -127,8 +126,7 @@ static int platform_mhu_probe(struct platform_device *pdev) if (!mhu) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mhu->base = devm_ioremap_resource(dev, res); + mhu->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mhu->base)) { dev_err(dev, "ioremap failed\n"); return PTR_ERR(mhu->base); -- 2.25.1