]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: adv_pci1724: remove use of comedi_error()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 17 Jul 2014 18:57:50 +0000 (11:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 00:59:02 +0000 (17:59 -0700)
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>
drivers/staging/comedi/drivers/adv_pci1724.c

index af670acb03d83503fc2b9826b99eb4939d6bc4c1..bc3c34916768a838715a11c0ad373e28a5513512 100644 (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++)