Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4508914pxb; Tue, 31 Aug 2021 06:58:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSc7OIhZWs5TjJ96VaM91xD0K4dDacIGnCHkMDs5O2fSrp3BQ3iUkqCnfcB2hWsgzcBRXY X-Received: by 2002:a05:6602:1845:: with SMTP id d5mr677614ioi.23.1630418302562; Tue, 31 Aug 2021 06:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418302; cv=none; d=google.com; s=arc-20160816; b=jYM+6tt6QmCYdDqdIyIOqR/APYjZsD7aBEnuGVZMEXQPhIeoLfFFeK5xgsW27m7wB7 gTE7vqRyaBF7M2HoSjO/sRfGiO2I72G3aYefkFZB09By4hWazrk7qfiZ+GX5zD93FNnG VFzA6pQqpQO9W7HpjwkIRzrEF3fhrVuW+1UeLAPVXl4Z1YzrOWn3TQc3hpBiYljWJMLn nCrfdOcn5NJur1SGjnZB+0ahesG81oWmEc/Kkww019jlFmiauskFJQ1evfLwoj8XvuH0 yATV/44/Ka9LV9x9N+OyEZtCMozIdyR86o2H/xinKnRC24jPsHM3vc6XPgdyMr5uojbs J3Xg== 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=FKeRiJHLSWDWLMdRCbDYNgtqXL5N4Npqm+gcd3jdwx4=; b=pxS7Vxwqzek1wa+RFVcMu6e2LLK3Y8cmOnBa9qNg5zo94w5pcNbqgU3TLv9m7nrssq sMXyJIluYC+flOY7TczgVR9lXYo5x3wqvpqVeY3QLekV1kvXL8h4jyNnBSZ4cFXNlukl ncxj/kFGnirZ7yUyVogkDDjqqppY0W9ZDVQ/gcRSrRhXFmr43K6CmVEBoGgfMh5AHOQU dgczCFxj/9H9Vh7FbLkAdrIUGbvLcNpHVFWzU6AoewtAuvmo9BWd8sljhkHXh0+ZCk7R 29YsDQzC9jXqhcx1U/OuhkQR1jfR3OpvPT8ZUFNHmcL8ccq/NJPx2AZuRarKC2rghAG7 +wfg== 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 d3si20484007jak.6.2021.08.31.06.58.10; Tue, 31 Aug 2021 06:58:22 -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 S233067AbhHaN5G (ORCPT + 99 others); Tue, 31 Aug 2021 09:57:06 -0400 Received: from mx20.baidu.com ([111.202.115.85]:59706 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234116AbhHaN5F (ORCPT ); Tue, 31 Aug 2021 09:57:05 -0400 Received: from BC-Mail-HQEX01.internal.baidu.com (unknown [172.31.51.57]) by Forcepoint Email with ESMTPS id 275F3445DCED39F3F2B8; Tue, 31 Aug 2021 21:56:09 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-HQEX01.internal.baidu.com (172.31.51.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 31 Aug 2021 21:56:08 +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, 31 Aug 2021 21:56:08 +0800 From: Cai Huoqing To: CC: Linus Walleij , David Airlie , Daniel Vetter , , Subject: [PATCH] drm/mcde: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 31 Aug 2021 21:56:02 +0800 Message-ID: <20210831135602.4476-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: BC-Mail-Ex30.internal.baidu.com (172.31.51.24) 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/gpu/drm/mcde/mcde_drv.c | 4 +--- drivers/gpu/drm/mcde/mcde_dsi.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index e60566a5739c..5b5afc6aaf8e 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -276,7 +276,6 @@ static int mcde_probe(struct platform_device *pdev) struct drm_device *drm; struct mcde *mcde; struct component_match *match = NULL; - struct resource *res; u32 pid; int irq; int ret; @@ -344,8 +343,7 @@ static int mcde_probe(struct platform_device *pdev) goto clk_disable; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mcde->regs = devm_ioremap_resource(dev, res); + mcde->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mcde->regs)) { dev_err(dev, "no MCDE regs\n"); ret = -EINVAL; diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 180ebbccbeda..5651734ce977 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1169,7 +1169,6 @@ static int mcde_dsi_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct mcde_dsi *d; struct mipi_dsi_host *host; - struct resource *res; u32 dsi_id; int ret; @@ -1187,8 +1186,7 @@ static int mcde_dsi_probe(struct platform_device *pdev) return PTR_ERR(d->prcmu); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - d->regs = devm_ioremap_resource(dev, res); + d->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(d->regs)) return PTR_ERR(d->regs); -- 2.25.1