Commit e29a7738 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: opticon: use port device for error and debug

Use port rather than interface device to report port related errors and
debug information.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b8718a2
...@@ -76,11 +76,11 @@ static void opticon_read_bulk_callback(struct urb *urb) ...@@ -76,11 +76,11 @@ static void opticon_read_bulk_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
/* this urb is terminated, clean up */ /* this urb is terminated, clean up */
dev_dbg(&priv->udev->dev, "%s - urb shutting down with status: %d\n", dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n",
__func__, status); __func__, status);
return; return;
default: default:
dev_dbg(&priv->udev->dev, "%s - nonzero urb status received: %d\n", dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n",
__func__, status); __func__, status);
goto exit; goto exit;
} }
...@@ -118,14 +118,14 @@ static void opticon_read_bulk_callback(struct urb *urb) ...@@ -118,14 +118,14 @@ static void opticon_read_bulk_callback(struct urb *urb)
priv->cts = true; priv->cts = true;
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
} else { } else {
dev_dbg(&priv->udev->dev, dev_dbg(&port->dev,
"Unknown data packet received from the device:" "Unknown data packet received from the device:"
" %2x %2x\n", " %2x %2x\n",
data[0], data[1]); data[0], data[1]);
} }
} }
} else { } else {
dev_dbg(&priv->udev->dev, dev_dbg(&port->dev,
"Improper amount of data received from the device, " "Improper amount of data received from the device, "
"%d bytes", urb->actual_length); "%d bytes", urb->actual_length);
} }
...@@ -219,7 +219,8 @@ static void opticon_write_control_callback(struct urb *urb) ...@@ -219,7 +219,8 @@ static void opticon_write_control_callback(struct urb *urb)
kfree(urb->setup_packet); kfree(urb->setup_packet);
if (status) if (status)
dev_dbg(&priv->udev->dev, "%s - nonzero write bulk status received: %d\n", dev_dbg(&priv->port->dev,
"%s - non-zero urb status received: %d\n",
__func__, status); __func__, status);
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
......
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