Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4508557pxb; Tue, 31 Aug 2021 06:57:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0oI/sUpKllCl4LpJS03LT6DHvD4Sv/05lbVdvSZeRereN2nx9+3/f5p1sh60k/hS9Ac2E X-Received: by 2002:aa7:c245:: with SMTP id y5mr24742579edo.20.1630418268721; Tue, 31 Aug 2021 06:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418268; cv=none; d=google.com; s=arc-20160816; b=biv863JK0/AAmPtHCXX4KrCPAAiqp0evCPkVzYSxhwQ0fkJQjNtXZulWBwmG7u3QkZ jZtWTDaW5xtlJyT16ZzMTaRs/DBkLfMVSZ5QlwFcVK928wS50Axyl6wv2zyiL+iLGgTy rN4jbo3Zt55vivivvAR3fdSmjiLmxNAyk3M7pIo178CYAb0uLDCQQ9MIVJmIZQ7uW2pj GKD5Qd3JWvMPJBfdl4cZKx3JP5RDf43t+UlgLv4xPLQ8U2stMcvBU627vrnHw16Fh+Ij H8j6rs7PBAf50l9HpqX2qGE3Ff3JDp08HzkBOtmUiRdo4rSke5nCOocsnRYUdchfiJAO Ba4g== 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=VZKsj8vXrNdYvz9Fn0AZ++IlXCmDhVepBe3udOZUm74=; b=JxYKTAAuqyZmsJC9oa4zWsSYny9LBHiHJ97TW5mxdINjfaJNWQ6QqiQJtpfYivowrW Q5jEb96Qk2zqj+bSscNaDzECCfbttmYSHImvEIjVgZB1QgGbuD2OlpO+S8fOHLpYdF5H pGlblVPyZ+AkIzBuxWPp9sNav0kjm9WyQ1zyMikcLoR0bh+xzFagrfXZEe4lLlYPQ1i2 kfKNLh2FeObQKmEBlUDwx1FkLHWAgMMK3DTUrehTTjYs0NL4x2ujL3S0WU8GvFIEbM4Q IJDfvw5EXJ6OCUol9cXGd3t0xtS9lVBQ8T4+RfUK7aTpQXiCMYZQa8fddXw7UoqTay4o OTyg== 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 u18si15771296ejk.196.2021.08.31.06.57.09; Tue, 31 Aug 2021 06:57:48 -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 S239804AbhHaN4N (ORCPT + 99 others); Tue, 31 Aug 2021 09:56:13 -0400 Received: from mx21.baidu.com ([220.181.3.85]:58868 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239065AbhHaN4J (ORCPT ); Tue, 31 Aug 2021 09:56:09 -0400 Received: from BC-Mail-Ex16.internal.baidu.com (unknown [172.31.51.56]) by Forcepoint Email with ESMTPS id 321E5EA96717360DCDA1; Tue, 31 Aug 2021 21:55:09 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex16.internal.baidu.com (172.31.51.56) 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:55: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:55:08 +0800 From: Cai Huoqing To: CC: Stefan Agner , Alison Wang , "David Airlie" , Daniel Vetter , , Subject: [PATCH] drm/fsl-dcu: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 31 Aug 2021 21:54:27 +0800 Message-ID: <20210831135427.4375-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/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 660fe573db96..90580074ef44 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -246,7 +246,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) struct fsl_dcu_drm_device *fsl_dev; struct drm_device *drm; struct device *dev = &pdev->dev; - struct resource *res; void __iomem *base; struct clk *pix_clk_in; char pix_clk_name[32]; @@ -264,8 +263,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) return -ENODEV; fsl_dev->soc = id->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { ret = PTR_ERR(base); return ret; -- 2.25.1