[PATCH 30/30 v2] Staging: comedi: fix printk() issue in das16m1.c

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

 



From: Ravishankar <ravi.shankar@xxxxxxxxxxxxxxx>

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

Signed-off-by: Ravishankar <ravishankarkm32@xxxxxxxxx>
---

 After understanding code I have changed  8 printk statement in int das16m1_attach function. 

 drivers/staging/comedi/drivers/das16m1.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index efc6132..d737ed2 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -680,17 +680,19 @@ static int das16m1_attach(struct comedi_device *dev,
 
 	dev->board_name = thisboard->name;
 
-	printk(" io 0x%lx-0x%lx 0x%lx-0x%lx",
+	printk(KERN_INFO " requesing the I/O region from 0x%lx-0x%lx 0x%lx-0x%lx",
 	       iobase, iobase + DAS16M1_SIZE,
 	       iobase + DAS16M1_82C55, iobase + DAS16M1_82C55 + DAS16M1_SIZE2);
 	if (!request_region(iobase, DAS16M1_SIZE, driver_das16m1.driver_name)) {
-		printk(" I/O port conflict\n");
-		return -EIO;
+		printk(KERN_INFO "the IO REGION is busy, quitting\n");
+		return -EBUSY;
 	}
 	if (!request_region(iobase + DAS16M1_82C55, DAS16M1_SIZE2,
 			    driver_das16m1.driver_name)) {
 		release_region(iobase, DAS16M1_SIZE);
- 		printk(" I/O port conflict\n");
+		printk(KERN_INFO " releasing  the I/O port region\n");
 		return -EIO;
 	}
 	dev->iobase = iobase;
@@ -702,15 +704,15 @@ static int das16m1_attach(struct comedi_device *dev,
 		ret = request_irq(irq, das16m1_interrupt, 0,
 				  driver_das16m1.driver_name, dev);
 		if (ret < 0) {
-			printk(", irq unavailable\n");
+			printk(KERN_INFO ", irq unavailable\n");
 			return ret;
 		}
 		dev->irq = irq;
-		printk(", irq %u\n", irq);
+		printk(KERN_INFO ", irq %u\n", irq);
 	} else if (irq == 0) {
-		printk(", no irq\n");
+		printk(KERN_INFO ", no irq\n");
 	} else {
-		printk(", invalid irq\n"
+		printk(KERN_ERR ", invalid irq\n"
 		       " valid irqs are 2, 3, 5, 7, 10, 11, 12, or 15\n");
 		return -EINVAL;
 	}
-- 
1.6.5.2

_______________________________________________
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