Skip to content

Commit

Permalink
video: wm8505fb: Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Tomi Valkeinen committed Apr 10, 2013
1 parent 7ab0a48 commit 8e524c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/video/wm8505fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8e524c9

Please sign in to comment.