Commit 8becad95 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Vojtech Pavlik

[PATCH] USB: convert empeg driver to use dev_err() and dev_info() macros

parent 31164daa
...@@ -181,7 +181,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp) ...@@ -181,7 +181,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
result = usb_submit_urb(port->read_urb, GFP_KERNEL); result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) 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; return result;
} }
...@@ -205,7 +205,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp) ...@@ -205,7 +205,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp)
usb_unlink_urb (port->read_urb); usb_unlink_urb (port->read_urb);
} }
/* Uncomment the following line if you want to see some statistics in your syslog */ /* Uncomment the following line if you want to see some statistics in your syslog */
/* info ("Bytes In = %d Bytes Out = %d", bytes_in, bytes_out); */ /* dev_info (port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
} }
...@@ -248,7 +248,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig ...@@ -248,7 +248,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
if (urb->transfer_buffer == NULL) { if (urb->transfer_buffer == NULL) {
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
if (urb->transfer_buffer == NULL) { if (urb->transfer_buffer == NULL) {
err("%s no more kernel memory...", __FUNCTION__); dev_err(port->dev, "%s no more kernel memory...\n", __FUNCTION__);
goto exit; goto exit;
} }
} }
...@@ -278,7 +278,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig ...@@ -278,7 +278,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */ /* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) { if (status) {
err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status); dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
bytes_sent = status; bytes_sent = status;
break; break;
} }
...@@ -426,7 +426,7 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs) ...@@ -426,7 +426,7 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC); result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result) if (result)
err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return; return;
...@@ -451,7 +451,7 @@ static void empeg_unthrottle (struct usb_serial_port *port) ...@@ -451,7 +451,7 @@ static void empeg_unthrottle (struct usb_serial_port *port)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC); result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result) 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; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment