]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fbdev: s3c-fb: use devm_platform_ioremap_resource() to simplify code
authorYueHaibing <yuehaibing@huawei.com>
Wed, 4 Sep 2019 11:55:23 +0000 (19:55 +0800)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 3 Jan 2020 13:27:45 +0000 (14:27 +0100)
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190904115523.25068-1-yuehaibing@huawei.com
drivers/video/fbdev/s3c-fb.c

index f4871c430f8da2c0e9f49f107c6b97df760206cc..9dc925054930e9975271cce86e1bc9b920087039 100644 (file)
@@ -1411,8 +1411,7 @@ static int s3c_fb_probe(struct platform_device *pdev)
 
        pm_runtime_enable(sfb->dev);
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       sfb->regs = devm_ioremap_resource(dev, res);
+       sfb->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(sfb->regs)) {
                ret = PTR_ERR(sfb->regs);
                goto err_lcd_clk;