Removed the word "attached" from the "ADC_zero" output which is now reported by comedi itself at the end of the auto attach. A negative value of the offset is an error and should be reported to comedi auto config as an error. Output only the offset if no error has been reported. Signed-off-by: Bernd Porr <mail@xxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/usbduxsigma.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index a5363de..125eae5 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -1656,11 +1656,14 @@ static int usbduxsigma_auto_attach(struct comedi_device *dev, } offset = usbduxsigma_getstatusinfo(dev, 0); - if (offset < 0) + if (offset < 0) { + /* a neg ADC value in comedi terms is a device error */ dev_err(dev->class_dev, - "Communication to USBDUXSIGMA failed! Check firmware and cabling\n"); + "Communication to USBDUXSIGMA failed! Check firmware and cabling.\n"); + return offset; + } - dev_info(dev->class_dev, "attached, ADC_zero = %x\n", offset); + dev_info(dev->class_dev, "ADC_zero = %x\n", offset); return 0; } -- 1.8.5.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel