diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-08 06:04:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-10 04:15:49 -0400 |
commit | 8e524c95040aa521283aba126c047381eadaed39 (patch) | |
tree | 9dc8b69b36e70a7732f172b29639f40b8d0185e9 | |
parent | 7ab0a48420c95dc4099d1777a5a24dffad102cf1 (diff) |
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>
-rw-r--r-- | drivers/video/wm8505fb.c | 7 |
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 @@ | |||
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/err.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
@@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev) | |||
303 | fbi->fb.pseudo_palette = addr; | 304 | fbi->fb.pseudo_palette = addr; |
304 | 305 | ||
305 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 306 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
306 | fbi->regbase = devm_request_and_ioremap(&pdev->dev, res); | 307 | fbi->regbase = devm_ioremap_resource(&pdev->dev, res); |
307 | if (fbi->regbase == NULL) | 308 | if (IS_ERR(fbi->regbase)) |
308 | return -EBUSY; | 309 | return PTR_ERR(fbi->regbase); |
309 | 310 | ||
310 | disp_timing = of_get_display_timings(pdev->dev.of_node); | 311 | disp_timing = of_get_display_timings(pdev->dev.of_node); |
311 | if (!disp_timing) | 312 | if (!disp_timing) |