diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-10 15:20:00 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-07-11 07:26:13 +0200 |
commit | 78dd4f415567a94fa134214f82b7966cbefde05c (patch) | |
tree | 1361dc410fd9ff9eb7f4a7ef04ef0f69fb92534e /drivers/video | |
parent | fbdev: imxfb: Convert to devm_kmalloc_array() (diff) | |
download | linux-78dd4f415567a94fa134214f82b7966cbefde05c.tar.xz linux-78dd4f415567a94fa134214f82b7966cbefde05c.zip |
fbdev: imxfb: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/imxfb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 7020b5f6434d..4582ea801121 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -869,7 +869,6 @@ static int imxfb_probe(struct platform_device *pdev) struct imxfb_info *fbi; struct lcd_device *lcd; struct fb_info *info; - struct resource *res; struct imx_fb_videomode *m; const struct of_device_id *of_id; struct device_node *display_np; @@ -886,10 +885,6 @@ static int imxfb_probe(struct platform_device *pdev) if (of_id) pdev->id_entry = of_id->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); if (!info) return -ENOMEM; @@ -971,7 +966,7 @@ static int imxfb_probe(struct platform_device *pdev) goto failed_getclock; } - fbi->regs = devm_ioremap_resource(&pdev->dev, res); + fbi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(fbi->regs)) { ret = PTR_ERR(fbi->regs); goto failed_ioremap; |