Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4516409pxb; Tue, 31 Aug 2021 07:05:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOC2yIK9kX5DP5vweSRv7iViU4UM+U/xeCFL/6LUL1KkymkOQjCggV+OA9tXgyz0r/MJF+ X-Received: by 2002:a05:6512:6f:: with SMTP id i15mr22008649lfo.20.1630418709334; Tue, 31 Aug 2021 07:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418709; cv=none; d=google.com; s=arc-20160816; b=fzD5L3P1x8o3OATfzKrotL/6psdzQZBF95gGn8MbeJPDYxkXPG2F0e8tz1xLwHofuK WFw6UDn8lTWFtakr6jcrMbR6rUZquUgCBIlMFM1SkeV9MDLlOqCUf5hCc12RuoCssKkx U1IKUQOtwcbb4Xsq+yTLbV4GwV6P1uqVN8XqVqOphAkL8NMLiic4Hri2uoCQRfk2leNw rYm4UQ9McjEWC2kMuhGWGrJbzVoxGpYnk81Adtdpc0PwxnTBn2GiZdr9Gctmx+CI/r1T PI+wlg8+VE//8oCM5oL+RfySvmljVEWUemj4eS52T4v/7NppswLCjygoTtvNbkVs9GOB Ln1Q== 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=UMfqRB7TdSg3TVIcjvTSZ5ZmM0QVla3nU/TSyK38P6o=; b=l+O2lRaXy7Vm6qfiv1FZBzZIl+Ppse8sNYOvW6+uWNOihphz8tLt4Wuk/7swANCkUQ Fu24mjAtZUjXg+O9Ds5y7MUPYhhL6iFGP0R9VOqhWEkMkDeiUM+DC5neBwpXwNtwsysQ WI71AljV7fEFzNRF2u87rAilbMEyXDTaeKVZDqs85BXRdX0MsKSCLkBy6aJpHJIDUvHh Urkduw83WOA4JmkbY+cF5b+K/PMTCskbcy7qSI6rlcTY+SzwzoPVVazfrCPKjeaJimMb XqQ/HHJxklDnFygGbB+CsjVgQcoma6blKzzVJ3zYPgprrw7iKp/q6u+LsgDvuhjfAEja 6f1A== 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 b14si11708001ejl.649.2021.08.31.07.04.23; Tue, 31 Aug 2021 07:05:09 -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 S234814AbhHaN6p (ORCPT + 99 others); Tue, 31 Aug 2021 09:58:45 -0400 Received: from mx21.baidu.com ([220.181.3.85]:60842 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236357AbhHaN63 (ORCPT ); Tue, 31 Aug 2021 09:58:29 -0400 Received: from BC-Mail-Ex11.internal.baidu.com (unknown [172.31.51.51]) by Forcepoint Email with ESMTPS id 52739B7DC06904A96624; Tue, 31 Aug 2021 21:57:28 +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, 31 Aug 2021 21:57:27 +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:57:27 +0800 From: Cai Huoqing To: CC: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , David Airlie , Daniel Vetter , , , , Subject: [PATCH] drm/rockchip: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 31 Aug 2021 21:57:21 +0800 Message-ID: <20210831135721.4726-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/rockchip/cdn-dp-core.c | 4 +--- drivers/gpu/drm/rockchip/inno_hdmi.c | 4 +--- drivers/gpu/drm/rockchip/rockchip_lvds.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 8ab3247dbc4a..5dce875dbd11 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -697,7 +697,6 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp) struct device *dev = dp->dev; struct device_node *np = dev->of_node; struct platform_device *pdev = to_platform_device(dev); - struct resource *res; dp->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); if (IS_ERR(dp->grf)) { @@ -705,8 +704,7 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp) return PTR_ERR(dp->grf); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dp->regs = devm_ioremap_resource(dev, res); + dp->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dp->regs)) { DRM_DEV_ERROR(dev, "ioremap reg failed\n"); return PTR_ERR(dp->regs); diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 7afdc54eb3ec..046e8ec2a71c 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -810,7 +810,6 @@ static int inno_hdmi_bind(struct device *dev, struct device *master, struct platform_device *pdev = to_platform_device(dev); struct drm_device *drm = data; struct inno_hdmi *hdmi; - struct resource *iores; int irq; int ret; @@ -821,8 +820,7 @@ static int inno_hdmi_bind(struct device *dev, struct device *master, hdmi->dev = dev; hdmi->drm_dev = drm; - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi->regs = devm_ioremap_resource(dev, iores); + hdmi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hdmi->regs)) return PTR_ERR(hdmi->regs); diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index 551653940e39..50574649a472 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -439,11 +439,9 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = { static int rk3288_lvds_probe(struct platform_device *pdev, struct rockchip_lvds *lvds) { - struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - lvds->regs = devm_ioremap_resource(lvds->dev, res); + lvds->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lvds->regs)) return PTR_ERR(lvds->regs); -- 2.25.1