Commit 8f35f918 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: amplc_pci230: remove use of comedi_error()

The comedi_error() function is just a wrapper around dev_err() that adds
the dev->driver->driver_name prefix to the message and a terminating
new-line character. The addition of the driver_name is just added noise
and some of the users of comedi_error() add unnecessary additional new-line
characters.

Use dev_err() directly instead of comedi_error() to avoid any confusion
and so that all the comedi generated kernel messages have the same format.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ef28904
...@@ -1167,7 +1167,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device *dev, ...@@ -1167,7 +1167,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device *dev,
if (ret == 0) { if (ret == 0) {
s->async->events |= COMEDI_CB_OVERFLOW; s->async->events |= COMEDI_CB_OVERFLOW;
pci230_ao_stop(dev, s); pci230_ao_stop(dev, s);
comedi_error(dev, "AO buffer underrun"); dev_err(dev->class_dev, "AO buffer underrun\n");
return; return;
} }
/* Write value to DAC. */ /* Write value to DAC. */
...@@ -1215,7 +1215,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev, ...@@ -1215,7 +1215,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev,
if (events == 0) { if (events == 0) {
/* Check for FIFO underrun. */ /* Check for FIFO underrun. */
if ((dacstat & PCI230P2_DAC_FIFO_UNDERRUN_LATCHED) != 0) { if ((dacstat & PCI230P2_DAC_FIFO_UNDERRUN_LATCHED) != 0) {
comedi_error(dev, "AO FIFO underrun"); dev_err(dev->class_dev, "AO FIFO underrun\n");
events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR; events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR;
} }
/* Check for buffer underrun if FIFO less than half full /* Check for buffer underrun if FIFO less than half full
...@@ -1223,7 +1223,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev, ...@@ -1223,7 +1223,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev,
* interrupts). */ * interrupts). */
if ((num_scans == 0) if ((num_scans == 0)
&& ((dacstat & PCI230P2_DAC_FIFO_HALF) == 0)) { && ((dacstat & PCI230P2_DAC_FIFO_HALF) == 0)) {
comedi_error(dev, "AO buffer underrun"); dev_err(dev->class_dev, "AO buffer underrun\n");
events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR; events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR;
} }
} }
...@@ -1270,7 +1270,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev, ...@@ -1270,7 +1270,7 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev,
/* Check if FIFO underrun occurred while writing to FIFO. */ /* Check if FIFO underrun occurred while writing to FIFO. */
dacstat = inw(dev->iobase + PCI230_DACCON); dacstat = inw(dev->iobase + PCI230_DACCON);
if ((dacstat & PCI230P2_DAC_FIFO_UNDERRUN_LATCHED) != 0) { if ((dacstat & PCI230P2_DAC_FIFO_UNDERRUN_LATCHED) != 0) {
comedi_error(dev, "AO FIFO underrun"); dev_err(dev->class_dev, "AO FIFO underrun\n");
events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR; events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR;
} }
} }
...@@ -2181,7 +2181,7 @@ static void pci230_handle_ai(struct comedi_device *dev, ...@@ -2181,7 +2181,7 @@ static void pci230_handle_ai(struct comedi_device *dev,
if ((status_fifo & PCI230_ADC_FIFO_FULL_LATCHED) != 0) { if ((status_fifo & PCI230_ADC_FIFO_FULL_LATCHED) != 0) {
/* Report error otherwise FIFO overruns will go /* Report error otherwise FIFO overruns will go
* unnoticed by the caller. */ * unnoticed by the caller. */
comedi_error(dev, "AI FIFO overrun"); dev_err(dev->class_dev, "AI FIFO overrun\n");
events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR; events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR;
break; break;
} else if ((status_fifo & PCI230_ADC_FIFO_EMPTY) != 0) { } else if ((status_fifo & PCI230_ADC_FIFO_EMPTY) != 0) {
...@@ -2208,7 +2208,7 @@ static void pci230_handle_ai(struct comedi_device *dev, ...@@ -2208,7 +2208,7 @@ static void pci230_handle_ai(struct comedi_device *dev,
/* Read sample and store in Comedi's circular buffer. */ /* Read sample and store in Comedi's circular buffer. */
if (comedi_buf_put(s, pci230_ai_read(dev)) == 0) { if (comedi_buf_put(s, pci230_ai_read(dev)) == 0) {
events |= COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW; events |= COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW;
comedi_error(dev, "AI buffer overflow"); dev_err(dev->class_dev, "AI buffer overflow\n");
break; break;
} }
fifoamount--; fifoamount--;
......
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