staging: comedi: adv_pci1724: 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>
This commit is contained in:
H Hartley Sweeten 2014-07-17 11:57:50 -07:00 committed by Greg Kroah-Hartman
parent d1fe2cfb5d
commit 3c08712f0e

View File

@ -143,7 +143,8 @@ static int wait_for_dac_idle(struct comedi_device *dev)
udelay(1);
}
if (i == timeout) {
comedi_error(dev, "Timed out waiting for dac to become idle.");
dev_err(dev->class_dev,
"Timed out waiting for dac to become idle\n");
return -EIO;
}
return 0;
@ -195,8 +196,8 @@ static int ao_readback_insn(struct comedi_device *dev,
int i;
if (devpriv->ao_value[channel] < 0) {
comedi_error(dev,
"Cannot read back channels which have not yet been written to.");
dev_err(dev->class_dev,
"Cannot read back channels which have not yet been written to\n");
return -EIO;
}
for (i = 0; i < insn->n; i++)
@ -236,8 +237,8 @@ static int offset_read_insn(struct comedi_device *dev,
int i;
if (devpriv->offset_value[channel] < 0) {
comedi_error(dev,
"Cannot read back channels which have not yet been written to.");
dev_err(dev->class_dev,
"Cannot read back channels which have not yet been written to\n");
return -EIO;
}
for (i = 0; i < insn->n; i++)
@ -277,8 +278,8 @@ static int gain_read_insn(struct comedi_device *dev,
int i;
if (devpriv->gain_value[channel] < 0) {
comedi_error(dev,
"Cannot read back channels which have not yet been written to.");
dev_err(dev->class_dev,
"Cannot read back channels which have not yet been written to\n");
return -EIO;
}
for (i = 0; i < insn->n; i++)