From: Grant Likely <grant.likely@secretlab.ca>
To: linux-kernel@vger.kernel.org,
linux-fbdev-devel@lists.sourceforge.net,
akonovalov@ru.mvista.com, linuxppc@ozlabs.org, adaplas@gmail.com
Subject: [PATCH 2/6] Xilinxfb: Replace calls to printk with dev_dbg, dev_err, etc.
Date: Mon, 01 Oct 2007 09:57:38 -0600 [thread overview]
Message-ID: <20071001155738.6114.51384.stgit@trillian.cg.shawcable.net> (raw)
In-Reply-To: <20071001155024.6114.47993.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
The dev_dbg, dev_err, etc functions provide more context that plain
vanilla printk which is useful for debugging. Where appropriate,
change printk calls to the appropriate dev_*() call.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/xilinxfb.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 1a5f1e4..e63cbd1 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -18,6 +18,7 @@
* Geert Uytterhoeven.
*/
+#include <linux/device.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
@@ -214,7 +215,7 @@ xilinxfb_drv_probe(struct device *dev)
drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
if (!drvdata) {
- printk(KERN_ERR "Couldn't allocate device private record\n");
+ dev_err(dev, "Couldn't allocate device private record\n");
return -ENOMEM;
}
dev_set_drvdata(dev, drvdata);
@@ -222,14 +223,13 @@ xilinxfb_drv_probe(struct device *dev)
/* Map the control registers in */
regs_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
if (!regs_res || (regs_res->end - regs_res->start + 1 < 8)) {
- printk(KERN_ERR "Couldn't get registers resource\n");
+ dev_err(dev, "Couldn't get registers resource\n");
retval = -EFAULT;
goto failed1;
}
if (!request_mem_region(regs_res->start, 8, DRIVER_NAME)) {
- printk(KERN_ERR
- "Couldn't lock memory region at 0x%08X\n",
+ dev_err(dev, "Couldn't lock memory region at 0x%08X\n",
regs_res->start);
retval = -EBUSY;
goto failed1;
@@ -241,7 +241,7 @@ xilinxfb_drv_probe(struct device *dev)
drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(FB_SIZE),
&drvdata->fb_phys, GFP_KERNEL);
if (!drvdata->fb_virt) {
- printk(KERN_ERR "Could not allocate frame buffer memory\n");
+ dev_err(dev, "Could not allocate frame buffer memory\n");
retval = -ENOMEM;
goto failed2;
}
@@ -267,7 +267,7 @@ xilinxfb_drv_probe(struct device *dev)
drvdata->info.pseudo_palette = drvdata->pseudo_palette;
if (fb_alloc_cmap(&drvdata->info.cmap, PALETTE_ENTRIES_NO, 0) < 0) {
- printk(KERN_ERR "Fail to allocate colormap (%d entries)\n",
+ dev_err(dev, "Fail to allocate colormap (%d entries)\n",
PALETTE_ENTRIES_NO);
retval = -EFAULT;
goto failed3;
@@ -282,7 +282,7 @@ xilinxfb_drv_probe(struct device *dev)
/* Register new frame buffer */
if (register_framebuffer(&drvdata->info) < 0) {
- printk(KERN_ERR "Could not register frame buffer\n");
+ dev_err(dev, "Could not register frame buffer\n");
retval = -EINVAL;
goto failed4;
}
next prev parent reply other threads:[~2007-10-01 15:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 15:57 [PATCH 0/6] Patch series to add of_platform binding to xilinxfb Grant Likely
2007-10-01 15:57 ` [PATCH 1/6] Xilinxfb: add banner output to probe routine when DEBUG is defined Grant Likely
2007-10-04 12:05 ` Andrei Konovalov
2007-10-01 15:57 ` Grant Likely [this message]
2007-10-04 12:06 ` [PATCH 2/6] Xilinxfb: Replace calls to printk with dev_dbg, dev_err, etc Andrei Konovalov
2007-10-01 15:57 ` [PATCH 3/6] Xilinxfb: rename failout labels to reflect failure Grant Likely
2007-10-04 12:06 ` Andrei Konovalov
2007-10-01 15:57 ` [PATCH 4/6] xilinxfb: Split device setup from bus binding Grant Likely
2007-10-04 12:07 ` Andrei Konovalov
2007-10-01 15:57 ` [PATCH 5/6] Xilinxfb: cleanup platform_bus binding to use platform bus API Grant Likely
2007-10-04 12:07 ` Andrei Konovalov
2007-10-01 15:57 ` [PATCH 6/6] Xilinxfb: add of_platform bus binding Grant Likely
2007-10-01 16:42 ` Akinobu Mita
2007-10-01 16:46 ` Grant Likely
2007-10-04 12:11 ` Andrei Konovalov
2007-10-03 0:15 ` [PATCH 0/6] Patch series to add of_platform binding to xilinxfb Antonino A. Daplas
2007-10-09 4:43 ` Grant Likely
2007-10-09 5:04 ` Antonino A. Daplas
2007-10-09 17:39 ` Grant Likely
2007-10-09 21:06 ` Antonino A. Daplas
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=20071001155738.6114.51384.stgit@trillian.cg.shawcable.net \
--to=grant.likely@secretlab.ca \
--cc=adaplas@gmail.com \
--cc=akonovalov@ru.mvista.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc@ozlabs.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).