Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4508641pxb; Tue, 31 Aug 2021 06:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwphbVBSRpQfoPPt/zQnzupS7kgALBHsU7/V0e4pSvjigQ0O8CQY82dS99+JtRHUJSGYU5I X-Received: by 2002:a92:c7d4:: with SMTP id g20mr21234513ilk.244.1630418279261; Tue, 31 Aug 2021 06:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418279; cv=none; d=google.com; s=arc-20160816; b=GOg+fhu+SrL+gm6Qbnmplc4SWXbnbNgdXM5Xu55XYwZcJvjcmkskYmPbKvXULa3LcF GBFIQVDuV+u7tVl4U+1yz5SBAwRa9x81Y6ngpqvdJcE9HVcai4RzMm9BaSKRys6eJdY5 xyrJkw38CcAXmtKTQeUjVimHF3yACthG6xiDFl0Jv990Fr1eFcfZNVL6C49LhxUamkhY RbHYGDQfV2g4ezEc3WKEUU2vf1jVW7m5KXwjcsS/WmMrT6cych3Xm9kFym4fJaIh8SyC LFv3cTMmQVmHT2s0MHgDdPf1o+i6Snp7eSrGNf7ZUSQaN5xMlRUsrL00l6u6u2/RXam7 RvbA== 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=5kg+aLe09+ZryX3io/1uubFqnFdr21FoPGyHx6aECnM=; b=nxd2HUWIsWUEAsBy8zTyC+DHU1vJSJGBQGh5fcVjG1CT+wzfypXnGpkNt9h//Z+uNV E233PetrYKjlNZMGPygFr3pegezbrIPhPW1HvE4YmtXsya6fXIVIgYueyuJzUvGrHP78 LWa1NVsj5xm20STr1+yzRVrUkXEM5lLrgxiLFs/ciQ/Ejc8rJHdhYxgTEDi+5C+QXZIG z1yMUNi2vA4NtkMVmGWjFENJ+b+gsAnTWGr2SOm3FWrm1xaFhPQR8RYiqTwudxt8lvPv O6i7sAbldqdnfmHUB5TlLKUMS44gvQwIVd6jSoNftpHZduNma/339FoF5KPTAjZQFCXQ dwxQ== 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 d8si18197597ila.45.2021.08.31.06.57.47; Tue, 31 Aug 2021 06:57:59 -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 S231860AbhHaN5y (ORCPT + 99 others); Tue, 31 Aug 2021 09:57:54 -0400 Received: from mx20.baidu.com ([111.202.115.85]:60262 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231634AbhHaN5r (ORCPT ); Tue, 31 Aug 2021 09:57:47 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id E5757B94A732856F2780; Tue, 31 Aug 2021 21:56:50 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) 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:50 +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:50 +0800 From: Cai Huoqing To: CC: Neil Armstrong , David Airlie , Daniel Vetter , Kevin Hilman , "Jerome Brunet" , Martin Blumenstingl , , , , Subject: [PATCH] drm/meson: Make use of the helper function devm_platform_ioremap_resourcexxx() Date: Tue, 31 Aug 2021 21:56:43 +0800 Message-ID: <20210831135644.4576-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_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately 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/meson/meson_drv.c | 3 +-- drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index bc0d60df04ae..7f41a33592c8 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -206,8 +206,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) priv->compat = match->compat; priv->afbcd.ops = match->afbcd_ops; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vpu"); - regs = devm_ioremap_resource(dev, res); + regs = devm_platform_ioremap_resource_byname(pdev, "vpu"); if (IS_ERR(regs)) { ret = PTR_ERR(regs); goto free_drm; diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 2ed87cfdd735..0afbd1e70bfc 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -978,7 +978,6 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, struct dw_hdmi_plat_data *dw_plat_data; struct drm_bridge *next_bridge; struct drm_encoder *encoder; - struct resource *res; int irq; int ret; @@ -1042,8 +1041,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, return PTR_ERR(meson_dw_hdmi->hdmitx_phy); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - meson_dw_hdmi->hdmitx = devm_ioremap_resource(dev, res); + meson_dw_hdmi->hdmitx = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(meson_dw_hdmi->hdmitx)) return PTR_ERR(meson_dw_hdmi->hdmitx); -- 2.25.1