linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource()
@ 2013-04-08 10:16 Sachin Kamat
  2013-04-08 18:31 ` Tony Prisk
  2013-04-10  8:23 ` Tomi Valkeinen
  0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-04-08 10:16 UTC (permalink / raw)
  To: linux-fbdev

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>
---
 drivers/video/wm8505fb.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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 <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)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-10  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 10:16 [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource() Sachin Kamat
2013-04-08 18:31 ` Tony Prisk
2013-04-10  8:23 ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).