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@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregk@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/adv_pci1724.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c index af670ac..bc3c349 100644 --- a/drivers/staging/comedi/drivers/adv_pci1724.c +++ b/drivers/staging/comedi/drivers/adv_pci1724.c @@ -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++) -- 1.9.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel