From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource()
Date: Mon, 08 Apr 2013 10:16:56 +0000 [thread overview]
Message-ID: <1365415496-6825-1-git-send-email-sachin.kamat@linaro.org> (raw)
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
next reply other threads:[~2013-04-08 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 10:16 Sachin Kamat [this message]
2013-04-08 18:31 ` [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource() Tony Prisk
2013-04-10 8:23 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365415496-6825-1-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).