fbdev: da8xx-fb: use devm_platform_ioremap_resource()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 22 Jul 2019 13:44:21 +0000 (15:44 +0200)
committerSekhar Nori <nsekhar@ti.com>
Mon, 26 Aug 2019 12:23:59 +0000 (17:53 +0530)
Shrink the code a bit by using the new helper wrapping the calls to
platform_get_resource() and devm_ioremap_resource() together.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/video/fbdev/da8xx-fb.c

index 19ed9889c8f855329ba19eddd465fd2acd71a633..f2f66605e8fbe41185f70f16f1441c9b28d99241 100644 (file)
@@ -1339,7 +1339,6 @@ static int fb_probe(struct platform_device *device)
 {
        struct da8xx_lcdc_platform_data *fb_pdata =
                                                dev_get_platdata(&device->dev);
-       struct resource *lcdc_regs;
        struct lcd_ctrl_config *lcd_cfg;
        struct fb_videomode *lcdc_info;
        struct fb_info *da8xx_fb_info;
@@ -1357,8 +1356,7 @@ static int fb_probe(struct platform_device *device)
        if (lcdc_info == NULL)
                return -ENODEV;
 
-       lcdc_regs = platform_get_resource(device, IORESOURCE_MEM, 0);
-       da8xx_fb_reg_base = devm_ioremap_resource(&device->dev, lcdc_regs);
+       da8xx_fb_reg_base = devm_platform_ioremap_resource(device, 0);
        if (IS_ERR(da8xx_fb_reg_base))
                return PTR_ERR(da8xx_fb_reg_base);