From b3780f1da1b1d4e0af32b0f71b590b2bfd9c3e63 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 17 Jul 2014 11:57:34 -0700 Subject: [PATCH] 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 12 ++++++------ 1 file 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 */ -- 2.7.4