Commit 765a24be authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl812: convert printk messages in pcl812_attach()

Convert the printk messages in this function to dev_{level} mesages.

Remove the ones that are just added noise.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e2f6df94
...@@ -1115,21 +1115,22 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1115,21 +1115,22 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (board->DMAbits != 0) { /* board support DMA */ if (board->DMAbits != 0) { /* board support DMA */
dma = it->options[2]; dma = it->options[2];
if (((1 << dma) & board->DMAbits) == 0) { if (((1 << dma) & board->DMAbits) == 0) {
printk(", DMA is out of allowed range, FAIL!\n"); dev_err(dev->class_dev,
"DMA is out of allowed range, FAIL!\n");
return -EINVAL; /* Bad DMA */ return -EINVAL; /* Bad DMA */
} }
ret = request_dma(dma, dev->board_name); ret = request_dma(dma, dev->board_name);
if (ret) { if (ret) {
printk(KERN_ERR ", unable to allocate DMA %u, FAIL!\n", dev_err(dev->class_dev,
dma); "unable to allocate DMA %u, FAIL!\n", dma);
return -EBUSY; /* DMA isn't free */ return -EBUSY; /* DMA isn't free */
} }
devpriv->dma = dma; devpriv->dma = dma;
printk(KERN_INFO ", dma=%u", dma);
pages = 1; /* we want 8KB */ pages = 1; /* we want 8KB */
devpriv->dmabuf[0] = __get_dma_pages(GFP_KERNEL, pages); devpriv->dmabuf[0] = __get_dma_pages(GFP_KERNEL, pages);
if (!devpriv->dmabuf[0]) { if (!devpriv->dmabuf[0]) {
printk(", unable to allocate DMA buffer, FAIL!\n"); dev_err(dev->class_dev,
"unable to allocate DMA buffer, FAIL!\n");
/* /*
* maybe experiment with try_to_free_pages() * maybe experiment with try_to_free_pages()
* will help .... * will help ....
...@@ -1141,7 +1142,8 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1141,7 +1142,8 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->hwdmasize[0] = PAGE_SIZE * (1 << pages); devpriv->hwdmasize[0] = PAGE_SIZE * (1 << pages);
devpriv->dmabuf[1] = __get_dma_pages(GFP_KERNEL, pages); devpriv->dmabuf[1] = __get_dma_pages(GFP_KERNEL, pages);
if (!devpriv->dmabuf[1]) { if (!devpriv->dmabuf[1]) {
printk(KERN_ERR ", unable to allocate DMA buffer, FAIL!\n"); dev_err(dev->class_dev,
"unable to allocate DMA buffer, FAIL!\n");
return -EBUSY; return -EBUSY;
} }
devpriv->dmapages[1] = pages; devpriv->dmapages[1] = pages;
...@@ -1243,10 +1245,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1243,10 +1245,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
default: default:
s->range_table = &range_bipolar10; s->range_table = &range_bipolar10;
break; break;
printk
(", incorrect range number %d, changing "
"to 0 (+/-10V)", it->options[4]);
break;
} }
break; break;
break; break;
...@@ -1273,10 +1271,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1273,10 +1271,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
default: default:
s->range_table = &range_iso813_1_ai; s->range_table = &range_iso813_1_ai;
break; break;
printk
(", incorrect range number %d, "
"changing to 0 ", it->options[1]);
break;
} }
break; break;
case boardACL8113: case boardACL8113:
...@@ -1298,10 +1292,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1298,10 +1292,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
default: default:
s->range_table = &range_acl8113_1_ai; s->range_table = &range_acl8113_1_ai;
break; break;
printk
(", incorrect range number %d, "
"changing to 0 ", it->options[1]);
break;
} }
break; break;
} }
...@@ -1387,7 +1377,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1387,7 +1377,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
break; break;
} }
printk(KERN_INFO "\n");
devpriv->valid = 1; devpriv->valid = 1;
pcl812_reset(dev); pcl812_reset(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment