summaryrefslogtreecommitdiffstats
path: root/drivers/video/wm8505fb.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-08 13:04:00 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-10 11:15:49 +0300
commit8e524c95040aa521283aba126c047381eadaed39 (patch)
tree9dc8b69b36e70a7732f172b29639f40b8d0185e9 /drivers/video/wm8505fb.c
parent7ab0a48420c95dc4099d1777a5a24dffad102cf1 (diff)
downloadlinux-8e524c95040aa521283aba126c047381eadaed39.tar.bz2
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 <sachin.kamat@linaro.org> Acked-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/wm8505fb.c')
-rw-r--r--drivers/video/wm8505fb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c
index 19e2e7ff492a..01f9ace068e2 100644
--- a/drivers/video/wm8505fb.c
+++ b/drivers/video/wm8505fb.c
@@ -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)