From 3f3ba29c78c4039a9fd746065ff89afec8bbc19a Mon Sep 17 00:00:00 2001 From: Felipe de Oliveira Tanus Date: Wed, 10 Mar 2010 02:03:49 -0300 Subject: [PATCH] Staging: comedi: cleanup dt2814.c This patch cleans up the dt2814.c driver file from issues found by checkpatch.pl tool. Signed-off-by: Felipe de Oliveira Tanus Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2814.c | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c index e1b73752f607..16fde066d266 100644 --- a/drivers/staging/comedi/drivers/dt2814.c +++ b/drivers/staging/comedi/drivers/dt2814.c @@ -99,13 +99,13 @@ static int dt2814_ai_insn_read(struct comedi_device *dev, outb(chan, dev->iobase + DT2814_CSR); for (i = 0; i < DT2814_TIMEOUT; i++) { status = inb(dev->iobase + DT2814_CSR); - printk("dt2814: status: %02x\n", status); + printk(KERN_INFO "dt2814: status: %02x\n", status); udelay(10); if (status & DT2814_FINISH) break; } if (i >= DT2814_TIMEOUT) { - printk("dt2814: status: %02x\n", status); + printk(KERN_INFO "dt2814: status: %02x\n", status); return -ETIMEDOUT; } @@ -173,7 +173,8 @@ static int dt2814_ai_cmdtest(struct comedi_device *dev, if (err) return 1; - /* step 2: make sure trigger sources are unique and mutually compatible */ + /* step 2: make sure trigger sources are + * unique and mutually compatible */ /* note that mutual compatibility is not an issue here */ if (cmd->stop_src != TRIG_TIMER && cmd->stop_src != TRIG_EXT) @@ -256,9 +257,9 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: dt2814: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: dt2814: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, DT2814_SIZE, "dt2814")) { - printk("I/O port conflict\n"); + printk(KERN_ERR "I/O port conflict\n"); return -EIO; } dev->iobase = iobase; @@ -267,7 +268,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) outb(0, dev->iobase + DT2814_CSR); udelay(100); if (inb(dev->iobase + DT2814_CSR) & DT2814_ERR) { - printk("reset error (fatal)\n"); + printk(KERN_ERR "reset error (fatal)\n"); return -EIO; } i = inb(dev->iobase + DT2814_DATA); @@ -286,9 +287,9 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) irq = probe_irq_off(irqs); restore_flags(flags); - if (inb(dev->iobase + DT2814_CSR) & DT2814_ERR) { - printk("error probing irq (bad) \n"); - } + if (inb(dev->iobase + DT2814_CSR) & DT2814_ERR) + printk(KERN_DEBUG "error probing irq (bad)\n"); + i = inb(dev->iobase + DT2814_DATA); i = inb(dev->iobase + DT2814_DATA); @@ -297,18 +298,18 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) dev->irq = 0; if (irq > 0) { if (request_irq(irq, dt2814_interrupt, 0, "dt2814", dev)) { - printk("(irq %d unavailable)\n", irq); + printk(KERN_WARNING "(irq %d unavailable)\n", irq); } else { - printk("( irq = %d )\n", irq); + printk(KERN_INFO "( irq = %d )\n", irq); dev->irq = irq; } } else if (irq == 0) { - printk("(no irq)\n"); + printk(KERN_WARNING "(no irq)\n"); } else { #if 0 - printk("(probe returned multiple irqs--bad)\n"); + printk(KERN_DEBUG "(probe returned multiple irqs--bad)\n"); #else - printk("(irq probe not implemented)\n"); + printk(KERN_WARNING "(irq probe not implemented)\n"); #endif } @@ -337,14 +338,13 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int dt2814_detach(struct comedi_device *dev) { - printk("comedi%d: dt2814: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: dt2814: remove\n", dev->minor); - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } - if (dev->iobase) { + + if (dev->iobase) release_region(dev->iobase, DT2814_SIZE); - } return 0; } -- 2.20.1