]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_labpc: remove use of comedi_error()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 17 Jul 2014 18:57:34 +0000 (11:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 00:59:01 +0000 (17:59 -0700)
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>
drivers/staging/comedi/drivers/ni_labpc.c

index 34ffa2e436576db198ac14fb749c3de4b093c104..6fb405eb0933940d8b0301fc91a6261d5e9049c7 100644 (file)
@@ -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 */