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

index b276ce485c5f39edcba3fdd491ca72f44c5772cf..b7c5d8168e98905b2d2cc84a777892a73e125941 100644 (file)
@@ -174,8 +174,8 @@ static void s626_debi_transfer(struct comedi_device *dev)
                udelay(1);
        }
        if (i == timeout)
-               comedi_error(dev,
-                       "Timeout while uploading to DEBI control register.");
+               dev_err(dev->class_dev,
+                       "Timeout while uploading to DEBI control register\n");
 
        /* Wait until DEBI transfer is done */
        for (i = 0; i < timeout; i++) {
@@ -184,7 +184,7 @@ static void s626_debi_transfer(struct comedi_device *dev)
                udelay(1);
        }
        if (i == timeout)
-               comedi_error(dev, "DEBI transfer timeout.");
+               dev_err(dev->class_dev, "DEBI transfer timeout\n");
 }
 
 /*
@@ -427,7 +427,7 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
        ret = comedi_timeout(dev, NULL, NULL, s626_send_dac_eoc,
                             s626_send_dac_wait_not_mc1_a2out);
        if (ret) {
-               comedi_error(dev, "DMA transfer timeout.");
+               dev_err(dev->class_dev, "DMA transfer timeout\n");
                return ret;
        }
 
@@ -452,7 +452,8 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
        ret = comedi_timeout(dev, NULL, NULL, s626_send_dac_eoc,
                             s626_send_dac_wait_ssr_af2_out);
        if (ret) {
-               comedi_error(dev, "TSL timeout waiting for slot 1 to execute.");
+               dev_err(dev->class_dev,
+                       "TSL timeout waiting for slot 1 to execute\n");
                return ret;
        }
 
@@ -497,8 +498,8 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
                ret = comedi_timeout(dev, NULL, NULL, s626_send_dac_eoc,
                                     s626_send_dac_wait_fb_buffer2_msb_00);
                if (ret) {
-                       comedi_error(dev,
-                               "TSL timeout waiting for slot 0 to execute.");
+                       dev_err(dev->class_dev,
+                               "TSL timeout waiting for slot 0 to execute\n");
                        return ret;
                }
        }
@@ -522,7 +523,8 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
        ret = comedi_timeout(dev, NULL, NULL, s626_send_dac_eoc,
                             s626_send_dac_wait_fb_buffer2_msb_ff);
        if (ret) {
-               comedi_error(dev, "TSL timeout waiting for slot 0 to execute.");
+               dev_err(dev->class_dev,
+                       "TSL timeout waiting for slot 0 to execute\n");
                return ret;
        }
        return 0;