From 8e524c95040aa521283aba126c047381eadaed39 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 8 Apr 2013 13:04:00 +0300 Subject: 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: Sachin Kamat Acked-by: Tony Prisk Signed-off-by: Tomi Valkeinen diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index 19e2e7f..01f9ace 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -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) -- cgit v0.10.2