From patchwork Wed Aug 28 08:49:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13780897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71D8EC54750 for ; Wed, 28 Aug 2024 08:41:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D05F910E0F0; Wed, 28 Aug 2024 08:41:37 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by gabe.freedesktop.org (Postfix) with ESMTPS id A5FE510E0F0 for ; Wed, 28 Aug 2024 08:41:35 +0000 (UTC) Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WtyWg4v6gzfbhN; Wed, 28 Aug 2024 16:39:27 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 84E13180087; Wed, 28 Aug 2024 16:41:31 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 28 Aug 2024 16:41:30 +0800 From: Jinjie Ruan To: , , , , , , , , , , CC: Subject: [PATCH -next] drm: zynqmp_dp: Use devm_platform_ioremap_resource_byname() Date: Wed, 28 Aug 2024 16:49:29 +0800 Message-ID: <20240828084929.2527228-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemh500013.china.huawei.com (7.202.181.146) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" platform_get_resource_byname() and devm_ioremap_resource() can be replaced by devm_platform_ioremap_resource_byname(), which can simplify the code logic a bit, No functional change here. Signed-off-by: Jinjie Ruan Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 129beac4c073..4eb19ac95bdb 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1715,7 +1715,6 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub) struct platform_device *pdev = to_platform_device(dpsub->dev); struct drm_bridge *bridge; struct zynqmp_dp *dp; - struct resource *res; int ret; dp = kzalloc(sizeof(*dp), GFP_KERNEL); @@ -1729,8 +1728,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub) INIT_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func); /* Acquire all resources (IOMEM, IRQ and PHYs). */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dp"); - dp->iomem = devm_ioremap_resource(dp->dev, res); + dp->iomem = devm_platform_ioremap_resource_byname(pdev, "dp"); if (IS_ERR(dp->iomem)) { ret = PTR_ERR(dp->iomem); goto err_free;