diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-11-26 18:42:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-03 12:20:23 -0500 |
commit | 5d24b7de41ab53b3f309629fa73e285a8f9645e2 (patch) | |
tree | ced593f5901c2e47db46bce4bdcffe3d9f57afbb | |
parent | e21f20e769c65cf0c327bc26e91b5e316b262491 (diff) |
staging: comedi: pcl816: convert printk messages in pcl816_attach()
Convert the printk messages in this function to dev_{level} mesages.
Remove the ones that are just added noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/pcl816.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 6d8dbf8d2dcf..d54325047af6 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c | |||
@@ -864,7 +864,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
864 | return ret; | 864 | return ret; |
865 | 865 | ||
866 | if (pcl816_check(dev->iobase)) { | 866 | if (pcl816_check(dev->iobase)) { |
867 | printk(KERN_ERR ", I cann't detect board. FAIL!\n"); | 867 | dev_err(dev->class_dev, "I can't detect board. FAIL!\n"); |
868 | return -EIO; | 868 | return -EIO; |
869 | } | 869 | } |
870 | 870 | ||
@@ -896,23 +896,24 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
896 | goto no_dma; /* DMA disabled */ | 896 | goto no_dma; /* DMA disabled */ |
897 | 897 | ||
898 | if (((1 << dma) & board->DMAbits) == 0) { | 898 | if (((1 << dma) & board->DMAbits) == 0) { |
899 | printk(", DMA is out of allowed range, FAIL!\n"); | 899 | dev_err(dev->class_dev, |
900 | "DMA is out of allowed range, FAIL!\n"); | ||
900 | return -EINVAL; /* Bad DMA */ | 901 | return -EINVAL; /* Bad DMA */ |
901 | } | 902 | } |
902 | ret = request_dma(dma, dev->board_name); | 903 | ret = request_dma(dma, dev->board_name); |
903 | if (ret) { | 904 | if (ret) { |
904 | printk(KERN_ERR | 905 | dev_err(dev->class_dev, |
905 | ", unable to allocate DMA %u, FAIL!\n", dma); | 906 | "unable to allocate DMA %u, FAIL!\n", dma); |
906 | return -EBUSY; /* DMA isn't free */ | 907 | return -EBUSY; /* DMA isn't free */ |
907 | } | 908 | } |
908 | 909 | ||
909 | devpriv->dma = dma; | 910 | devpriv->dma = dma; |
910 | printk(KERN_INFO ", dma=%u", dma); | ||
911 | pages = 2; /* we need 16KB */ | 911 | pages = 2; /* we need 16KB */ |
912 | devpriv->dmabuf[0] = __get_dma_pages(GFP_KERNEL, pages); | 912 | devpriv->dmabuf[0] = __get_dma_pages(GFP_KERNEL, pages); |
913 | 913 | ||
914 | if (!devpriv->dmabuf[0]) { | 914 | if (!devpriv->dmabuf[0]) { |
915 | printk(", unable to allocate DMA buffer, FAIL!\n"); | 915 | dev_err(dev->class_dev, |
916 | "unable to allocate DMA buffer, FAIL!\n"); | ||
916 | /* | 917 | /* |
917 | * maybe experiment with try_to_free_pages() | 918 | * maybe experiment with try_to_free_pages() |
918 | * will help .... | 919 | * will help .... |
@@ -925,9 +926,8 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
925 | 926 | ||
926 | devpriv->dmabuf[1] = __get_dma_pages(GFP_KERNEL, pages); | 927 | devpriv->dmabuf[1] = __get_dma_pages(GFP_KERNEL, pages); |
927 | if (!devpriv->dmabuf[1]) { | 928 | if (!devpriv->dmabuf[1]) { |
928 | printk(KERN_ERR | 929 | dev_err(dev->class_dev, |
929 | ", unable to allocate DMA buffer, " | 930 | "unable to allocate DMA buffer, FAIL!\n"); |
930 | "FAIL!\n"); | ||
931 | return -EBUSY; | 931 | return -EBUSY; |
932 | } | 932 | } |
933 | devpriv->dmapages[1] = pages; | 933 | devpriv->dmapages[1] = pages; |
@@ -997,8 +997,6 @@ case COMEDI_SUBD_DO: | |||
997 | 997 | ||
998 | pcl816_reset(dev); | 998 | pcl816_reset(dev); |
999 | 999 | ||
1000 | printk("\n"); | ||
1001 | |||
1002 | return 0; | 1000 | return 0; |
1003 | } | 1001 | } |
1004 | 1002 | ||