drm/tve200: Use devm_platform_ioremap_resource()

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 <yang.lee@linux.alibaba.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230421091319.79744-1-yang.lee@linux.alibaba.com
This commit is contained in:
Yang Li 2023-04-21 17:13:19 +08:00 committed by Linus Walleij
parent e1964d892f
commit 15f5ee6b77
1 changed files with 1 additions and 3 deletions

View File

@ -156,7 +156,6 @@ static int tve200_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct tve200_drm_dev_private *priv; struct tve200_drm_dev_private *priv;
struct drm_device *drm; struct drm_device *drm;
struct resource *res;
int irq; int irq;
int ret; int ret;
@ -192,8 +191,7 @@ static int tve200_probe(struct platform_device *pdev)
goto clk_disable; goto clk_disable;
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->regs = devm_platform_ioremap_resource(pdev, 0);
priv->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(priv->regs)) { if (IS_ERR(priv->regs)) {
dev_err(dev, "%s failed mmio\n", __func__); dev_err(dev, "%s failed mmio\n", __func__);
ret = -EINVAL; ret = -EINVAL;