Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3517281pxb; Tue, 7 Sep 2021 01:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTkLuztfpLz7l0Y7PX80a8Gi17jjZqPPNCXqCUpmdcNfZjyEvcIfdsLJi0fVh2cDr8CMS9 X-Received: by 2002:a05:6402:1cbc:: with SMTP id cz28mr17270879edb.370.1631001809156; 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=BxuyuMYePIMTJQSl9EjWNk936wWYeauM0iYnKkqI6hO5BtQK23Iz8Wf44yVRXGMRe/ 7JyDDrX1i9wtQOuyPtsQDIhQsRCAvs6s+48sdDXRPAs4uWzBV+QApGnFdVijvp6AF9JH X8IsU+YJEMznr3oJapMboORLmnhJJY27p0bSQZJ1/2WIAbtA/mTscY68czR+Z1MuenjU 1lBO1YG6eLifpSH1wdZM5ScH4qyh+kFSqIVg/h3F+R1hutqEgBGEJJ+3Wf3qNkXpWFMy ISAFBq/KXouICov5MP11ECUwM9JHhEGtx2hoV3gVFClJ2nln9zf2+QH9kjm+wgz6g+V0 dgvw== 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=Bg5JVX8ERSkNvpBeP4naLiyio8SEYbKq4c1Y+xZ3LkE=; b=goCPSUileqVcXxWm3qpz0bkmdZX2sJEhD4OmbawA8pZ+76JjUEaZoFEe+KUiZvI+sb YmoWjGZE/jRwEH0YHqqCwb86jrKldijygVdKeTMsgo8LodeI26Zkt9LR/sZHyaIqcOZH i8kaaWpWuhy4Bbh66eonB9x1QjJAAQGURS+5C0BJJRXULawwrfwGd54MRwXaPctbt2Cz p0p/rWtTiA8xSaKAWhJYAmPum0E13cOkGa0SUOWZmeqyf1rE0i++QOAviGd29namwgxT ZhukfIJC7fbyuTajAlyfeddSMgd9OU85vQVe4MnHvL4ESQCuGpDhjAvJlEnaBuv13NRK JGug== 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 a16si12030162ejk.287.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 S239792AbhIGHmx (ORCPT + 99 others); Tue, 7 Sep 2021 03:42:53 -0400 Received: from mx20.baidu.com ([111.202.115.85]:43700 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240031AbhIGHmb (ORCPT ); Tue, 7 Sep 2021 03:42:31 -0400 Received: from BC-Mail-Ex06.internal.baidu.com (unknown [172.31.51.46]) by Forcepoint Email with ESMTPS id 4F49A138808F714EF620; Tue, 7 Sep 2021 15:41:24 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex06.internal.baidu.com (172.31.51.46) 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:24 +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:23 +0800 From: Cai Huoqing To: CC: Jassi Brar , Matthias Brugger , , , Subject: [PATCH] mailbox: mtk-cmdq: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 15:41:17 +0800 Message-ID: <20210907074118.2247-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/mtk-cmdq-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index 64175a893312..505b4988680b 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -525,7 +525,6 @@ static struct mbox_chan *cmdq_xlate(struct mbox_controller *mbox, static int cmdq_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct cmdq *cmdq; int err, i; struct gce_plat *plat_data; @@ -538,8 +537,7 @@ static int cmdq_probe(struct platform_device *pdev) if (!cmdq) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - cmdq->base = devm_ioremap_resource(dev, res); + cmdq->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cmdq->base)) return PTR_ERR(cmdq->base); -- 2.25.1