[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1314627226-14196-1-git-send-email-ravi.shankar@greenturtles.in>
Date: Mon, 29 Aug 2011 19:43:46 +0530
From: Ravishankarkm <ravi.shankar@...enturtles.in>
To: gregkh@...e.de, wfp5p@...ginia.edu
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Ravishankarkm <ravi.shankar@...enturtles.in>
Subject: [PATCH 1/3] Staging: comedi: fix printk issue in das1800.c
From: Ravishankarkm <ravi.shankar@...enturtles.in>
This is a patch to the das1800.c file that fixes up a pritnk warning found by the checkpatch.pl tool
Signed-off-by: Ravishankarkm <ravi.shankar@...enturtles.in>
---
drivers/staging/comedi/drivers/das1800.c | 41 +++++++++++++++--------------
1 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index a6df30b..222232c 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -631,37 +631,36 @@ static int das1800_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct das1800_private)) < 0)
return -ENOMEM;
- printk("comedi%d: %s: io 0x%lx", dev->minor, driver_das1800.driver_name,
- iobase);
+ pr_info("comedi%d: %s: io 0x%lx", dev->minor, driver_das1800.driver_name,
+ iobase);
if (irq) {
- printk(", irq %u", irq);
+ pr_cont(", irq %u", irq);
if (dma0) {
- printk(", dma %u", dma0);
+ pr_cont(", dma %u", dma0);
if (dma1)
- printk(" and %u", dma1);
+ pr_cont(" and %u", dma1);
}
}
- printk("\n");
+ pr_cont("\n");
if (iobase == 0) {
- printk(" io base address required\n");
+ pr_warn("comedi%d: %s: io base address required\n",
+ dev->minor, driver_das1800.driver_name);
return -EINVAL;
}
/* check if io addresses are available */
if (!request_region(iobase, DAS1800_SIZE, driver_das1800.driver_name)) {
- printk
- (" I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
- iobase, iobase + DAS1800_SIZE - 1);
+ pr_err("comedi%d: I/O port conflict:failed to allocate ports "
+ "0x%lx to 0x%lx\n", dev->minor, iobase,
+ iobase + DAS1800_SIZE - 1);
return -EIO;
}
dev->iobase = iobase;
board = das1800_probe(dev);
- if (board < 0) {
- printk(" unable to determine board type\n");
+ if (board < 0)
return -ENODEV;
- }
dev->board_ptr = das1800_boards + board;
dev->board_name = thisboard->name;
@@ -671,9 +670,9 @@ static int das1800_attach(struct comedi_device *dev,
iobase2 = iobase + IOBASE2;
if (!request_region(iobase2, DAS1800_SIZE,
driver_das1800.driver_name)) {
- printk
- (" I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
- iobase2, iobase2 + DAS1800_SIZE - 1);
+ pr_err("comedi%d: I/O port conflict:failed to allocate ports "
+ "0x%lx to 0x%lx\n", dev->minor, iobase2,
+ iobase2 + DAS1800_SIZE - 1);
return -EIO;
}
devpriv->iobase2 = iobase2;
@@ -683,7 +682,8 @@ static int das1800_attach(struct comedi_device *dev,
if (irq) {
if (request_irq(irq, das1800_interrupt, 0,
driver_das1800.driver_name, dev)) {
- printk(" unable to allocate irq %u\n", irq);
+ pr_warn("comedi%d: %s: unable to allocate irq %u\n",
+ dev->minor, driver_das1800.driver_name, irq);
return -EINVAL;
}
}
@@ -712,7 +712,8 @@ static int das1800_attach(struct comedi_device *dev,
devpriv->irq_dma_bits |= 0x38;
break;
default:
- printk(" irq out of range\n");
+ pr_warn("comedi%d: %s: irq out of range\n",
+ dev->minor, driver_das1800.driver_name);
return -EINVAL;
break;
}
@@ -813,8 +814,8 @@ static int das1800_detach(struct comedi_device *dev)
kfree(devpriv->ai_buf1);
}
- printk("comedi%d: %s: remove\n", dev->minor,
- driver_das1800.driver_name);
+ pr_info("comedi%d: %s: remove\n", dev->minor,
+ driver_das1800.driver_name);
return 0;
};
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists