diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-10-04 12:48:36 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2007-10-09 20:11:20 -0400 |
commit | 3cb3ec2c26473d8123a468abfaca1e926344b1c2 (patch) | |
tree | 774b45defd8f5b5cc0f4a010512de9bc8a62b99e /drivers | |
parent | 258de4badd5b7b5d168307638f755bd4df16c18e (diff) |
[POWERPC] XilinxFB: Replace calls to printk with dev_dbg, dev_err, etc.
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>
Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 1a5f1e429c4d..e63cbd1acfd2 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Geert Uytterhoeven. | 18 | * Geert Uytterhoeven. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/device.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/version.h> | 24 | #include <linux/version.h> |
@@ -214,7 +215,7 @@ xilinxfb_drv_probe(struct device *dev) | |||
214 | 215 | ||
215 | drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL); | 216 | drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL); |
216 | if (!drvdata) { | 217 | if (!drvdata) { |
217 | printk(KERN_ERR "Couldn't allocate device private record\n"); | 218 | dev_err(dev, "Couldn't allocate device private record\n"); |
218 | return -ENOMEM; | 219 | return -ENOMEM; |
219 | } | 220 | } |
220 | dev_set_drvdata(dev, drvdata); | 221 | dev_set_drvdata(dev, drvdata); |
@@ -222,14 +223,13 @@ xilinxfb_drv_probe(struct device *dev) | |||
222 | /* Map the control registers in */ | 223 | /* Map the control registers in */ |
223 | regs_res = platform_get_resource(pdev, IORESOURCE_IO, 0); | 224 | regs_res = platform_get_resource(pdev, IORESOURCE_IO, 0); |
224 | if (!regs_res || (regs_res->end - regs_res->start + 1 < 8)) { | 225 | if (!regs_res || (regs_res->end - regs_res->start + 1 < 8)) { |
225 | printk(KERN_ERR "Couldn't get registers resource\n"); | 226 | dev_err(dev, "Couldn't get registers resource\n"); |
226 | retval = -EFAULT; | 227 | retval = -EFAULT; |
227 | goto failed1; | 228 | goto failed1; |
228 | } | 229 | } |
229 | 230 | ||
230 | if (!request_mem_region(regs_res->start, 8, DRIVER_NAME)) { | 231 | if (!request_mem_region(regs_res->start, 8, DRIVER_NAME)) { |
231 | printk(KERN_ERR | 232 | dev_err(dev, "Couldn't lock memory region at 0x%08X\n", |
232 | "Couldn't lock memory region at 0x%08X\n", | ||
233 | regs_res->start); | 233 | regs_res->start); |
234 | retval = -EBUSY; | 234 | retval = -EBUSY; |
235 | goto failed1; | 235 | goto failed1; |
@@ -241,7 +241,7 @@ xilinxfb_drv_probe(struct device *dev) | |||
241 | drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(FB_SIZE), | 241 | drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(FB_SIZE), |
242 | &drvdata->fb_phys, GFP_KERNEL); | 242 | &drvdata->fb_phys, GFP_KERNEL); |
243 | if (!drvdata->fb_virt) { | 243 | if (!drvdata->fb_virt) { |
244 | printk(KERN_ERR "Could not allocate frame buffer memory\n"); | 244 | dev_err(dev, "Could not allocate frame buffer memory\n"); |
245 | retval = -ENOMEM; | 245 | retval = -ENOMEM; |
246 | goto failed2; | 246 | goto failed2; |
247 | } | 247 | } |
@@ -267,7 +267,7 @@ xilinxfb_drv_probe(struct device *dev) | |||
267 | drvdata->info.pseudo_palette = drvdata->pseudo_palette; | 267 | drvdata->info.pseudo_palette = drvdata->pseudo_palette; |
268 | 268 | ||
269 | if (fb_alloc_cmap(&drvdata->info.cmap, PALETTE_ENTRIES_NO, 0) < 0) { | 269 | if (fb_alloc_cmap(&drvdata->info.cmap, PALETTE_ENTRIES_NO, 0) < 0) { |
270 | printk(KERN_ERR "Fail to allocate colormap (%d entries)\n", | 270 | dev_err(dev, "Fail to allocate colormap (%d entries)\n", |
271 | PALETTE_ENTRIES_NO); | 271 | PALETTE_ENTRIES_NO); |
272 | retval = -EFAULT; | 272 | retval = -EFAULT; |
273 | goto failed3; | 273 | goto failed3; |
@@ -282,7 +282,7 @@ xilinxfb_drv_probe(struct device *dev) | |||
282 | 282 | ||
283 | /* Register new frame buffer */ | 283 | /* Register new frame buffer */ |
284 | if (register_framebuffer(&drvdata->info) < 0) { | 284 | if (register_framebuffer(&drvdata->info) < 0) { |
285 | printk(KERN_ERR "Could not register frame buffer\n"); | 285 | dev_err(dev, "Could not register frame buffer\n"); |
286 | retval = -EINVAL; | 286 | retval = -EINVAL; |
287 | goto failed4; | 287 | goto failed4; |
288 | } | 288 | } |