This is a patch to the s626.c file that fixes up a printk found
by the checkpatch.pl tool.

Used dev_<level> functions instead of printks wherver possible.

Signed-off-by: Ravishankar Karkala Mallikarjunayya 
<[email protected]>
---
 drivers/staging/comedi/drivers/s626.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c 
b/drivers/staging/comedi/drivers/s626.c
index a0b7c71..aef9a3d 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -590,13 +590,13 @@ static int s626_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
        devpriv->pdev = pdev;
 
        if (pdev == NULL) {
-               printk(KERN_ERR "s626_attach: Board not present!!!\n");
+               dev_err(dev->hw_dev, "Board not present!!!\n");
                return -ENODEV;
        }
 
        result = comedi_pci_enable(pdev, "s626");
        if (result < 0) {
-               printk(KERN_ERR "s626_attach: comedi_pci_enable fails\n");
+               dev_err(dev->hw_dev, "comedi_pci_enable fails\n");
                return -ENODEV;
        }
        devpriv->got_regions = 1;
@@ -605,7 +605,7 @@ static int s626_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
 
        devpriv->base_addr = ioremap(resourceStart, SIZEOF_ADDRESS_SPACE);
        if (devpriv->base_addr == NULL) {
-               printk(KERN_ERR "s626_attach: IOREMAP failed\n");
+               dev_err(dev->hw_dev, "IOREMAP failed\n");
                return -ENODEV;
        }
 
@@ -626,7 +626,7 @@ static int s626_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
                    pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma);
 
                if (devpriv->ANABuf.LogicalBase == NULL) {
-                       printk(KERN_ERR "s626_attach: DMA Memory mapping 
error\n");
+                       dev_err(dev->hw_dev, "DMA Memory mapping error\n");
                        return -ENOMEM;
                }
 
@@ -643,7 +643,7 @@ static int s626_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
                    pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma);
 
                if (devpriv->RPSBuf.LogicalBase == NULL) {
-                       printk(KERN_ERR "s626_attach: DMA Memory mapping 
error\n");
+                       dev_err(dev->hw_dev, "DMA Memory mapping error\n");
                        return -ENOMEM;
                }
 
@@ -669,13 +669,13 @@ static int s626_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
 
        /* set up interrupt handler */
        if (dev->irq == 0) {
-               printk(KERN_ERR " unknown irq (bad)\n");
+               dev_err(dev->hw_dev, "unknown irq (bad)\n");
        } else {
                ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED,
                                  "s626", dev);
 
                if (ret < 0) {
-                       printk(KERN_ERR " irq not available\n");
+                       dev_err(dev->hw_dev, "irq not available\n");
                        dev->irq = 0;
                }
        }
-- 
1.7.0.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to