summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/ni_at_a2150.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-07-17 11:57:35 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 17:59:01 -0700
commit770bc73dc5d030d26e5179b819bdcf021ff5d6e3 (patch)
treeb626f301ba0823c70641461b772f375b84fcb429 /drivers/staging/comedi/drivers/ni_at_a2150.c
parentb3780f1da1b1d4e0af32b0f71b590b2bfd9c3e63 (diff)
staging: comedi: ni_at_a2150: 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_at_a2150.c')
-rw-r--r--drivers/staging/comedi/drivers/ni_at_a2150.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c
index 465c729ee685..86c05e382d09 100644
--- a/drivers/staging/comedi/drivers/ni_at_a2150.c
+++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
@@ -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);