提交 923faa6a 编写于 作者: G Greg Kroah-Hartman

staging: comedi: dt9812.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 151373aa
......@@ -547,7 +547,7 @@ static void dt9812_configure_gain(struct usb_dt9812 *dev,
rmw->or_value = F020_MASK_ADC0CF_AMP0GN2;
break;
default:
err("Illegal gain %d\n", gain);
dev_err(&dev->interface->dev, "Illegal gain %d\n", gain);
}
}
......@@ -715,7 +715,7 @@ static int dt9812_probe(struct usb_interface *interface,
iface_desc = interface->cur_altsetting;
if (iface_desc->desc.bNumEndpoints != 5) {
err("Wrong number of endpoints.");
dev_err(&interface->dev, "Wrong number of endpoints.\n");
retval = -ENODEV;
goto error;
}
......@@ -781,22 +781,22 @@ static int dt9812_probe(struct usb_interface *interface,
}
if (dt9812_read_info(dev, 1, &dev->vendor, sizeof(dev->vendor)) != 0) {
err("Failed to read vendor.");
dev_err(&interface->dev, "Failed to read vendor.\n");
retval = -ENODEV;
goto error;
}
if (dt9812_read_info(dev, 3, &dev->product, sizeof(dev->product)) != 0) {
err("Failed to read product.");
dev_err(&interface->dev, "Failed to read product.\n");
retval = -ENODEV;
goto error;
}
if (dt9812_read_info(dev, 5, &dev->device, sizeof(dev->device)) != 0) {
err("Failed to read device.");
dev_err(&interface->dev, "Failed to read device.\n");
retval = -ENODEV;
goto error;
}
if (dt9812_read_info(dev, 7, &dev->serial, sizeof(dev->serial)) != 0) {
err("Failed to read serial.");
dev_err(&interface->dev, "Failed to read serial.\n");
retval = -ENODEV;
goto error;
}
......@@ -1146,7 +1146,9 @@ static int __init usb_dt9812_init(void)
result = comedi_driver_register(&dt9812_comedi_driver);
if (result) {
usb_deregister(&dt9812_usb_driver);
err("comedi_driver_register failed. Error number %d", result);
printk(KERN_ERR KBUILD_MODNAME
": comedi_driver_register failed. Error number %d\n",
result);
}
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册