From 3c08712f0e88180bd17bb58ef08d94c48fe532fb Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 17 Jul 2014 11:57:50 -0700 Subject: [PATCH] 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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 af670acb03d8..bc3c34916768 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++) -- 2.39.5