diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-07-17 18:57:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-18 00:59:01 (GMT) |
commit | b3780f1da1b1d4e0af32b0f71b590b2bfd9c3e63 (patch) | |
tree | e1f1a057223ba4afc2324a9de557b48a999dd348 | |
parent | 5ac1d82bb41942245f6605771a7defb8e931e317 (diff) | |
download | linux-b3780f1da1b1d4e0af32b0f71b590b2bfd9c3e63.tar.xz |
staging: comedi: ni_labpc: 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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 34ffa2e..6fb405e 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -895,7 +895,7 @@ static int labpc_drain_fifo(struct comedi_device *dev) devpriv->stat1 = devpriv->read_byte(dev->iobase + STAT1_REG); } if (i == timeout) { - comedi_error(dev, "ai timeout, fifo never empties"); + dev_err(dev->class_dev, "ai timeout, fifo never empties\n"); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; return -1; } @@ -926,7 +926,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) struct comedi_cmd *cmd; if (!dev->attached) { - comedi_error(dev, "premature interrupt"); + dev_err(dev->class_dev, "premature interrupt\n"); return IRQ_HANDLED; } @@ -950,7 +950,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) devpriv->write_byte(0x1, dev->iobase + ADC_FIFO_CLEAR_REG); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; cfc_handle_events(dev, s); - comedi_error(dev, "overrun"); + dev_err(dev->class_dev, "overrun\n"); return IRQ_HANDLED; } @@ -960,7 +960,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) labpc_drain_fifo(dev); if (devpriv->stat1 & STAT1_CNTINT) { - comedi_error(dev, "handled timer interrupt?"); + dev_err(dev->class_dev, "handled timer interrupt?\n"); /* clear it */ devpriv->write_byte(0x1, dev->iobase + TIMER_CLEAR_REG); } @@ -970,7 +970,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) devpriv->write_byte(0x1, dev->iobase + ADC_FIFO_CLEAR_REG); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; cfc_handle_events(dev, s); - comedi_error(dev, "overflow"); + dev_err(dev->class_dev, "overflow\n"); return IRQ_HANDLED; } /* handle external stop trigger */ @@ -1186,7 +1186,7 @@ static int labpc_eeprom_write(struct comedi_device *dev, break; } if (i == timeout) { - comedi_error(dev, "eeprom write timed out"); + dev_err(dev->class_dev, "eeprom write timed out\n"); return -ETIME; } /* update software copy of eeprom */ |