This patch fixes a printk warning issue found by the checkpatch.pl tool. Convert printk messages to dev_<levels> and removes useless printk messages. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@xxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/dt2801.c | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c index 5cce1b5..9f07365 100644 --- a/drivers/staging/comedi/drivers/dt2801.c +++ b/drivers/staging/comedi/drivers/dt2801.c @@ -424,7 +424,8 @@ static int dt2801_reset(struct comedi_device *dev) break; } while (timeout--); if (!timeout) - printk("dt2801: timeout 1 status=0x%02x\n", stat); + dev_dbg(dev->hw_dev, "dt2801: timeout 1 status=0x%02x\n", + stat); /* printk("dt2801: reading dummy\n"); */ /* dt2801_readdata(dev,&board_code); */ @@ -441,7 +442,8 @@ static int dt2801_reset(struct comedi_device *dev) break; } while (timeout--); if (!timeout) - printk("dt2801: timeout 2 status=0x%02x\n", stat); + dev_dbg(dev->hw_dev, "dt2801: timeout 2 status=0x%02x\n", + stat); DPRINTK("dt2801: reading code\n"); dt2801_readdata(dev, &board_code); @@ -521,10 +523,8 @@ static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it) int n_ai_chans; iobase = it->options[0]; - if (!request_region(iobase, DT2801_IOSIZE, "dt2801")) { - comedi_error(dev, "I/O port conflict"); + if (!request_region(iobase, DT2801_IOSIZE, "dt2801")) return -EIO; - } dev->iobase = iobase; /* do some checking */ @@ -539,16 +539,13 @@ static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (boardtypes[type].boardcode == board_code) goto havetype; } - printk("dt2801: unrecognized board code=0x%02x, contact author\n", - board_code); + dev_warn(dev->hw_dev, "dt2801: unrecognized board code=0x%02x, contact author\n", + board_code); type = 0; havetype: dev->board_ptr = boardtypes + type; - printk("dt2801: %s at port 0x%lx", boardtype.name, iobase); - n_ai_chans = probe_number_of_ai_chans(dev); - printk(" (ai channels = %d)", n_ai_chans); ret = alloc_subdevices(dev, 4); if (ret < 0) @@ -610,7 +607,6 @@ havetype: ret = 0; out: - printk("\n"); return ret; } @@ -627,12 +623,13 @@ static int dt2801_error(struct comedi_device *dev, int stat) { if (stat < 0) { if (stat == -ETIME) - printk("dt2801: timeout\n"); + dev_err(dev->hw_dev, "dt2801: timeout\n"); else - printk("dt2801: error %d\n", stat); + dev_err(dev->hw_dev, "dt2801: error %d\n", stat); return stat; } - printk("dt2801: error status 0x%02x, resetting...\n", stat); + dev_err(dev->hw_dev, "dt2801: error status 0x%02x, resetting...\n", + stat); dt2801_reset(dev); dt2801_reset(dev); -- 1.7.0.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel