From cefe93362efa05937eeefa165008863145e0194e Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 17 Jul 2014 11:57:28 -0700 Subject: [PATCH] staging: comedi: s626: 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/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 b276ce485c5f..b7c5d8168e98 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; -- 2.30.2