Commit 2c856780 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: hwdrv_apci3120: 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 61768da1
......@@ -318,7 +318,8 @@ static int apci3120_setup_chan_list(struct comedi_device *dev,
/* correct channel and range number check itself comedi/range.c */
if (n_chan < 1) {
if (!check)
comedi_error(dev, "range/channel list is empty!");
dev_err(dev->class_dev,
"range/channel list is empty!\n");
return 0;
}
/* All is ok, so we can setup channel/range list */
......@@ -1373,10 +1374,10 @@ static void apci3120_interrupt_dma(int irq, void *d)
if (samplesinbuf <
devpriv->ui_DmaBufferUsesize[devpriv->ui_DmaActualBuffer]) {
comedi_error(dev, "Interrupted DMA transfer!");
dev_err(dev->class_dev, "Interrupted DMA transfer!\n");
}
if (samplesinbuf & 1) {
comedi_error(dev, "Odd count of bytes in DMA ring!");
dev_err(dev->class_dev, "Odd count of bytes in DMA ring!\n");
apci3120_cancel(dev, s);
return;
}
......@@ -1548,7 +1549,7 @@ static void apci3120_interrupt(int irq, void *d)
int_amcc = inl(devpriv->i_IobaseAmcc + AMCC_OP_REG_INTCSR); /* get AMCC int register */
if ((!int_daq) && (!(int_amcc & ANY_S593X_INT))) {
comedi_error(dev, "IRQ from unknown source");
dev_err(dev->class_dev, "IRQ from unknown source\n");
return;
}
......@@ -1565,9 +1566,9 @@ static void apci3120_interrupt(int irq, void *d)
inb(devpriv->i_IobaseAmcc + APCI3120_TIMER_STATUS_REGISTER);
if (int_amcc & MASTER_ABORT_INT)
comedi_error(dev, "AMCC IRQ - MASTER DMA ABORT!");
dev_err(dev->class_dev, "AMCC IRQ - MASTER DMA ABORT!\n");
if (int_amcc & TARGET_ABORT_INT)
comedi_error(dev, "AMCC IRQ - TARGET DMA ABORT!");
dev_err(dev->class_dev, "AMCC IRQ - TARGET DMA ABORT!\n");
/* Ckeck if EOC interrupt */
if (((int_daq & 0x8) == 0)
......@@ -1740,7 +1741,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
unsigned char b_Tmp;
if (!data[1])
comedi_error(dev, "config:No timer constant !");
dev_err(dev->class_dev, "No timer constant!\n");
devpriv->b_Timer2Interrupt = (unsigned char) data[2]; /* save info whether to enable or disable interrupt */
......@@ -1886,14 +1887,14 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
if ((devpriv->b_Timer2Mode != APCI3120_WATCHDOG)
&& (devpriv->b_Timer2Mode != APCI3120_TIMER)) {
comedi_error(dev, "\nwrite:timer2 not configured ");
dev_err(dev->class_dev, "timer2 not configured\n");
return -EINVAL;
}
if (data[0] == 2) { /* write new value */
if (devpriv->b_Timer2Mode != APCI3120_TIMER) {
comedi_error(dev,
"write :timer2 not configured in TIMER MODE");
dev_err(dev->class_dev,
"timer2 not configured in TIMER MODE\n");
return -EINVAL;
}
......@@ -1991,8 +1992,8 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
case 2: /* write new value to Timer */
if (devpriv->b_Timer2Mode != APCI3120_TIMER) {
comedi_error(dev,
"write :timer2 not configured in TIMER MODE");
dev_err(dev->class_dev,
"timer2 not configured in TIMER MODE\n");
return -EINVAL;
}
/* ui_Timervalue2=data[1]; // passed as argument */
......@@ -2056,7 +2057,7 @@ static int apci3120_read_insn_timer(struct comedi_device *dev,
if ((devpriv->b_Timer2Mode != APCI3120_WATCHDOG)
&& (devpriv->b_Timer2Mode != APCI3120_TIMER)) {
comedi_error(dev, "\nread:timer2 not configured ");
dev_err(dev->class_dev, "timer2 not configured\n");
}
/* this_board->timer_read(dev,data); */
......
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