Commit 7e4198f4 authored by Ravishankar karkala Mallikarjunayya's avatar Ravishankar karkala Mallikarjunayya Committed by Greg Kroah-Hartman

Staging: comedi: fix printk issue in das6402.c

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

Converted printks to dev_version.
Removed unnecessary printk statements.
Signed-off-by: default avatarRavishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 855f62ef
...@@ -171,7 +171,7 @@ static irqreturn_t intr_handler(int irq, void *d) ...@@ -171,7 +171,7 @@ static irqreturn_t intr_handler(int irq, void *d)
struct comedi_subdevice *s = dev->subdevices; struct comedi_subdevice *s = dev->subdevices;
if (!dev->attached || devpriv->das6402_ignoreirq) { if (!dev->attached || devpriv->das6402_ignoreirq) {
printk("das6402: BUG: spurious interrupt\n"); dev_warn(dev->hw_dev, "BUG: spurious interrupt\n");
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#ifdef DEBUG #ifdef DEBUG
...@@ -228,9 +228,7 @@ static int das6402_ai_cancel(struct comedi_device *dev, ...@@ -228,9 +228,7 @@ static int das6402_ai_cancel(struct comedi_device *dev,
*/ */
devpriv->das6402_ignoreirq = 1; devpriv->das6402_ignoreirq = 1;
#ifdef DEBUG dev_dbg(dev->hw_dev, "Stopping acquisition\n");
printk("das6402: Stopping acquisition\n");
#endif
devpriv->das6402_ignoreirq = 1; devpriv->das6402_ignoreirq = 1;
outb_p(0x02, dev->iobase + 10); /* disable external trigging */ outb_p(0x02, dev->iobase + 10); /* disable external trigging */
outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */ outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */
...@@ -246,10 +244,7 @@ static int das6402_ai_mode2(struct comedi_device *dev, ...@@ -246,10 +244,7 @@ static int das6402_ai_mode2(struct comedi_device *dev,
struct comedi_subdevice *s, comedi_trig * it) struct comedi_subdevice *s, comedi_trig * it)
{ {
devpriv->das6402_ignoreirq = 1; devpriv->das6402_ignoreirq = 1;
dev_dbg(dev->hw_dev, "Starting acquisition\n");
#ifdef DEBUG
printk("das6402: Starting acquisition\n");
#endif
outb_p(0x03, dev->iobase + 10); /* enable external trigging */ outb_p(0x03, dev->iobase + 10); /* enable external trigging */
outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */ outw_p(SCANL, dev->iobase + 2); /* resets the card fifo */
outb_p(IRQ | CONVSRC | BURSTEN | INTE, dev->iobase + 9); outb_p(IRQ | CONVSRC | BURSTEN | INTE, dev->iobase + 9);
...@@ -329,10 +324,8 @@ static int das6402_attach(struct comedi_device *dev, ...@@ -329,10 +324,8 @@ static int das6402_attach(struct comedi_device *dev,
if (iobase == 0) if (iobase == 0)
iobase = 0x300; iobase = 0x300;
printk("comedi%d: das6402: 0x%04lx", dev->minor, iobase);
if (!request_region(iobase, DAS6402_SIZE, "das6402")) { if (!request_region(iobase, DAS6402_SIZE, "das6402")) {
printk(" I/O port conflict\n"); dev_err(dev->hw_dev, "I/O port conflict\n");
return -EIO; return -EIO;
} }
dev->iobase = iobase; dev->iobase = iobase;
...@@ -340,14 +333,12 @@ static int das6402_attach(struct comedi_device *dev, ...@@ -340,14 +333,12 @@ static int das6402_attach(struct comedi_device *dev,
/* should do a probe here */ /* should do a probe here */
irq = it->options[0]; irq = it->options[0];
printk(" ( irq = %u )", irq); dev_dbg(dev->hw_dev, "( irq = %u )\n", irq);
ret = request_irq(irq, intr_handler, 0, "das6402", dev); ret = request_irq(irq, intr_handler, 0, "das6402", dev);
if (ret < 0) { if (ret < 0)
printk("irq conflict\n");
return ret; return ret;
}
dev->irq = irq;
dev->irq = irq;
ret = alloc_private(dev, sizeof(struct das6402_private)); ret = alloc_private(dev, sizeof(struct das6402_private));
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment