From patchwork Tue Jan 21 07:50:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shixiong Ou X-Patchwork-Id: 13945914 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 F3512C02182 for ; Tue, 21 Jan 2025 07:51:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BBDA10E4EA; Tue, 21 Jan 2025 07:51:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.b="ahj6IIUZ"; dkim-atps=neutral Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by gabe.freedesktop.org (Postfix) with ESMTP id 37D4610E4EA for ; Tue, 21 Jan 2025 07:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=pDSeF k+LOdLdoQAIClpWcVVVNDGjKxQEEF+U/Jv1pBA=; b=ahj6IIUZMKJCkYc/gVT5k 2LojJslh/h9nEiHrrOLFgAZ4OO091ZLdH+d/wefRgNJOP5vs0XtZ7FvLJ0+wHwdW GYHtob1Pryh43Zsk7BBsPMfInpZbTiZyDlrTeVYgJSrP08yDHmz08cmy3BJgStoV iza9kQas21cbXJmklBsd9k= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g1-3 (Coremail) with SMTP id _____wD3TwjcUY9n605cHg--.59188S2; Tue, 21 Jan 2025 15:50:53 +0800 (CST) From: oushixiong1025@163.com To: Joel Stanley Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Andrew Jeffery , linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Shixiong Ou Subject: [PATCH] drm/aspeed: Use devm_platform_get_and_ioremap_resource() Date: Tue, 21 Jan 2025 15:50:41 +0800 Message-Id: <20250121075041.201599-1-oushixiong1025@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: _____wD3TwjcUY9n605cHg--.59188S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZFW3uw4UJr1kAFyrJFWxtFb_yoW3KFbE9F 48ursxXFW7Aryqg3y2v3ZxCFyIkF9a9rW8GF18tayFq3W7Z34DX34jgr1vqr1a9w4fAF98 t3WUJr13A3s7CjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbqNtDUUUUU== X-Originating-IP: [116.128.244.169] X-CM-SenderInfo: xrxvxxx0lr0wirqskqqrwthudrp/1tbiXQ3bD2ePUAodpQAAsO 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" From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index a7a6b70220eb..33f81b53771d 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -146,8 +146,7 @@ static int aspeed_gfx_load(struct drm_device *drm) struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(drm->dev, res); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);