[PATCH] Staging: comedi: cleanup dt2814.c This patch clean up the dt2814.c driver file from issues found by checkpatch.pl tool. Signed-off-by: Felipe de Oliveira Tanus <fotanus@xxxxxxxxx>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 drivers/staging/comedi/drivers/dt2814.c |   38 +++++++++++++++---------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index e1b7375..16fde06 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;
 }
-- 
1.7.0.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux