[PATCH 01/29] staging: comedi: s626: remove use of comedi_error()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/s626.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index b276ce4..b7c5d81 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -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;
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux