Commit 8e524c95 authored by Sachin Kamat's avatar Sachin Kamat Committed by Tomi Valkeinen

video: wm8505fb: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarTony Prisk <linux@prisktech.co.nz>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 7ab0a484
......@@ -18,6 +18,7 @@
#include <linux/dma-mapping.h>
#include <linux/fb.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
......@@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev)
fbi->fb.pseudo_palette = addr;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fbi->regbase = devm_request_and_ioremap(&pdev->dev, res);
if (fbi->regbase == NULL)
return -EBUSY;
fbi->regbase = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(fbi->regbase))
return PTR_ERR(fbi->regbase);
disp_timing = of_get_display_timings(pdev->dev.of_node);
if (!disp_timing)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment