Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3517280pxb; Tue, 7 Sep 2021 01:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjntpXBJ9x7XoBDIO5CaK3zOb9mgcdYZhY7qWg+FnnvZswdGZS6+5cssP4jd9ysOKN9Dif X-Received: by 2002:a17:907:4ce:: with SMTP id vz14mr17931424ejb.552.1631001809176; Tue, 07 Sep 2021 01:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631001809; cv=none; d=google.com; s=arc-20160816; b=BQvUMES3aVFg22ojCJa7F6PDOodhjC2xkgHuR6Pk6Oh3R04L46v+D7YI9I/vUokqbe z2J+mUzzuCJAExtzVBTL61WCxBYwMx3H2SK9+2O0aTuSDtYxcIXn9ZFIR9zyfO7zpPHA xRzuuCsqn21YYUBBbFbx0dZqk5cigRc/KF6c9Q8ELsdjvDPfJrLPEpDBBXYr8ersj72C dRNW+B2PrVnbskCNC7yq2XyEiEE31DFQJHGk6x8SyfnS+Vh/oV+zvUtuW9cJj+JB6uWr yu3khgPz84WlTYe+50RhWW3s26skOpTWwZsEGjHw9C/gtFfQUdShnXjBe7FEuYI1Zfbm a7GQ== 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=rr0IgCDKhuL0ZcH9ImDk2JvHvpScLshZkh93Bwun8iI=; b=oR8U+dGERHhYdt/EgLhZHnmvXLJb9EHvG0E2PsbXs+zayUVuPXOmuhVdMc2L1AikQq f8BwH1iQhLSnBX/OQEcUrXYeuROg5Xair94Mgd51XYCD3kE6dnm3oxdqCJ0JDnYR23VJ TPi0cBEVY8D3NSEeJE2Hs0ddyyNc9EtxTE91QJMG+GbKpUWLsVtJp5iunNzP2s5Sgsyo xCIl7YMFzMsXkUjIRAHrLoO4r6NfH2TOvipe1+yMjA6Yp9xCAI/lBWb9dXr0Hmkb3jfN AWgBzWUW2tJxDQ5TlGywD9msRpgSJboqZ2HQ0X6qIgAdTunMlKpsSVGWdRtltAjUK3bF Ze+A== 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 o14si8947801edr.253.2021.09.07.01.03.05; Tue, 07 Sep 2021 01:03:29 -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 S239392AbhIGHmS (ORCPT + 99 others); Tue, 7 Sep 2021 03:42:18 -0400 Received: from mx21.baidu.com ([220.181.3.85]:43390 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239195AbhIGHmR (ORCPT ); Tue, 7 Sep 2021 03:42:17 -0400 Received: from BC-Mail-Ex11.internal.baidu.com (unknown [172.31.51.51]) by Forcepoint Email with ESMTPS id 14C5FAA232E92BDBC8B0; Tue, 7 Sep 2021 15:41:10 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex11.internal.baidu.com (172.31.51.51) 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:09 +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:09 +0800 From: Cai Huoqing To: CC: Jassi Brar , Subject: [PATCH] mailbox: hi3660: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:41:03 +0800 Message-ID: <20210907074104.2145-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/hi3660-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c index 395ddc250828..e41bd2f5ea46 100644 --- a/drivers/mailbox/hi3660-mailbox.c +++ b/drivers/mailbox/hi3660-mailbox.c @@ -240,7 +240,6 @@ static int hi3660_mbox_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct hi3660_mbox *mbox; struct mbox_chan *chan; - struct resource *res; unsigned long ch; int err; @@ -248,8 +247,7 @@ static int hi3660_mbox_probe(struct platform_device *pdev) if (!mbox) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mbox->base = devm_ioremap_resource(dev, res); + mbox->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mbox->base)) return PTR_ERR(mbox->base); -- 2.25.1