staging: comedi: ni_at_a2150: remove use of comedi_error()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 17 Jul 2014 18:57:35 +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_at_a2150.c

index 465c729ee68531d0568abd6d9fe70d33dc264de6..86c05e382d09c5858cde0bcd27d1b4ac4a2d5d5d 100644 (file)
@@ -179,7 +179,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d)
        static const int sample_size = sizeof(devpriv->dma_buffer[0]);
 
        if (!dev->attached) {
-               comedi_error(dev, "premature interrupt");
+               dev_err(dev->class_dev, "premature interrupt\n");
                return IRQ_HANDLED;
        }
        /*  initialize async here to make sure s is not NULL */
@@ -189,18 +189,19 @@ static irqreturn_t a2150_interrupt(int irq, void *d)
        status = inw(dev->iobase + STATUS_REG);
 
        if ((status & INTR_BIT) == 0) {
-               comedi_error(dev, "spurious interrupt");
+               dev_err(dev->class_dev, "spurious interrupt\n");
                return IRQ_NONE;
        }
 
        if (status & OVFL_BIT) {
-               comedi_error(dev, "fifo overflow");
+               dev_err(dev->class_dev, "fifo overflow\n");
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
                cfc_handle_events(dev, s);
        }
 
        if ((status & DMA_TC_BIT) == 0) {
-               comedi_error(dev, "caught non-dma interrupt?  Aborting.");
+               dev_err(dev->class_dev,
+                       "caught non-dma interrupt?  Aborting.\n");
                async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
                cfc_handle_events(dev, s);
                return IRQ_HANDLED;
@@ -408,8 +409,8 @@ static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        unsigned int trigger_bits;
 
        if (cmd->flags & TRIG_RT) {
-               comedi_error(dev,
-                            " dma incompatible with hard real-time interrupt (TRIG_RT), aborting");
+               dev_err(dev->class_dev,
+                       "dma incompatible with hard real-time interrupt (TRIG_RT), aborting\n");
                return -1;
        }
        /*  clear fifo and reset triggering circuitry */
@@ -490,7 +491,7 @@ static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                trigger_bits |= HW_TRIG_EN;
        } else if (cmd->start_src == TRIG_OTHER) {
                /*  XXX add support for level/slope start trigger using TRIG_OTHER */
-               comedi_error(dev, "you shouldn't see this?");
+               dev_err(dev->class_dev, "you shouldn't see this?\n");
        }
        /*  send trigger config bits */
        outw(trigger_bits, dev->iobase + TRIGGER_REG);
This page took 0.03362 seconds and 5 git commands to generate.