Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 770bc73d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3780f1d
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -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);