ChangeSet 1.946.3.11, 2002/12/26 13:58:26-08:00, greg@kroah.com [PATCH] USB: convert ir-usb driver to use dev_err() and dev_info() macros diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c --- a/drivers/usb/serial/ir-usb.c Fri Dec 27 23:57:33 2002 +++ b/drivers/usb/serial/ir-usb.c Fri Dec 27 23:57:33 2002 @@ -243,7 +243,7 @@ irda_desc = irda_usb_find_class_desc (serial->dev, 0); if (irda_desc == NULL) { - err ("IRDA class descriptor not found, device not bound"); + dev_err (serial->dev->dev, "IRDA class descriptor not found, device not bound\n"); return -ENODEV; } @@ -291,7 +291,7 @@ /* override the default buffer sizes */ buffer = kmalloc (buffer_size, GFP_KERNEL); if (!buffer) { - err ("%s - out of memory.", __FUNCTION__); + dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__); return -ENOMEM; } kfree (port->read_urb->transfer_buffer); @@ -300,7 +300,7 @@ buffer = kmalloc (buffer_size, GFP_KERNEL); if (!buffer) { - err ("%s - out of memory.", __FUNCTION__); + dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__); return -ENOMEM; } kfree (port->write_urb->transfer_buffer); @@ -320,7 +320,7 @@ port); result = usb_submit_urb(port->read_urb, GFP_KERNEL); if (result) - err("%s - failed submitting read urb, error %d", __FUNCTION__, result); + dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); return result; } @@ -353,7 +353,7 @@ dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count); if (!port->tty) { - err ("%s - no tty???", __FUNCTION__); + dev_err (port->dev, "%s - no tty???\n", __FUNCTION__); return 0; } @@ -399,7 +399,7 @@ result = usb_submit_urb (port->write_urb, GFP_ATOMIC); if (result) - err("%s - failed submitting write urb, error %d", __FUNCTION__, result); + dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); else result = transfer_size; @@ -503,11 +503,9 @@ port); result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - err("%s - failed resubmitting read urb, error %d", - __FUNCTION__, - result); + dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", + __FUNCTION__, result); break ; @@ -601,7 +599,7 @@ result = usb_submit_urb (port->write_urb, GFP_KERNEL); if (result) - err("%s - failed submitting write urb, error %d", __FUNCTION__, result); + dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); } return; }