Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yangtao Li and committed by
Helge Deller
78dd4f41 55dd7378

+1 -6
+1 -6
drivers/video/fbdev/imxfb.c
··· 869 869 struct imxfb_info *fbi; 870 870 struct lcd_device *lcd; 871 871 struct fb_info *info; 872 - struct resource *res; 873 872 struct imx_fb_videomode *m; 874 873 const struct of_device_id *of_id; 875 874 struct device_node *display_np; ··· 884 885 of_id = of_match_device(imxfb_of_dev_id, &pdev->dev); 885 886 if (of_id) 886 887 pdev->id_entry = of_id->data; 887 - 888 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 889 - if (!res) 890 - return -ENODEV; 891 888 892 889 info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); 893 890 if (!info) ··· 966 971 goto failed_getclock; 967 972 } 968 973 969 - fbi->regs = devm_ioremap_resource(&pdev->dev, res); 974 + fbi->regs = devm_platform_ioremap_resource(pdev, 0); 970 975 if (IS_ERR(fbi->regs)) { 971 976 ret = PTR_ERR(fbi->regs); 972 977 goto failed_ioremap;