From patchwork Fri Apr 21 09:13:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13219655 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 51011C77B7E for ; Fri, 21 Apr 2023 09:13:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 575B410E043; Fri, 21 Apr 2023 09:13:29 +0000 (UTC) Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id A284E10E043 for ; Fri, 21 Apr 2023 09:13:26 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R121e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046049; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=6; SR=0; TI=SMTPD_---0VgcHWof_1682068400; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VgcHWof_1682068400) by smtp.aliyun-inc.com; Fri, 21 Apr 2023 17:13:21 +0800 From: Yang Li To: linus.walleij@linaro.org Subject: [PATCH -next] drm/tve200: Use devm_platform_ioremap_resource() Date: Fri, 21 Apr 2023 17:13:19 +0800 Message-Id: <20230421091319.79744-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 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: , Cc: Yang Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/gpu/drm/tve200/tve200_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index abd557332b28..40b1168ad671 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -156,7 +156,6 @@ static int tve200_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct tve200_drm_dev_private *priv; struct drm_device *drm; - struct resource *res; int irq; int ret; @@ -192,8 +191,7 @@ static int tve200_probe(struct platform_device *pdev) goto clk_disable; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) { dev_err(dev, "%s failed mmio\n", __func__); ret = -EINVAL;