Message ID | 20250122030155.57802-1-oushixiong1025@163.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] drm/aspeed: Use devm_platform_get_and_ioremap_resource() | expand |
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);