aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/opticon.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-11-18 13:23:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-21 13:33:54 -0800
commite29a7738c531ba33a70cbf78809fb3dc5a0a42db (patch)
treeefa5900a722db0b17ab8e7461bf32f85031ccd49 /drivers/usb/serial/opticon.c
parentUSB: opticon: move private urb initialisation to attach (diff)
downloadlinux-dev-e29a7738c531ba33a70cbf78809fb3dc5a0a42db.tar.xz
linux-dev-e29a7738c531ba33a70cbf78809fb3dc5a0a42db.zip
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: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r--drivers/usb/serial/opticon.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 8c66471f3bff..bcb8ad84a74a 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -76,11 +76,11 @@ static void opticon_read_bulk_callback(struct urb *urb)
case -ENOENT:
case -ESHUTDOWN:
/* 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);
return;
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);
goto exit;
}
@@ -118,14 +118,14 @@ static void opticon_read_bulk_callback(struct urb *urb)
priv->cts = true;
spin_unlock_irqrestore(&priv->lock, flags);
} else {
- dev_dbg(&priv->udev->dev,
+ dev_dbg(&port->dev,
"Unknown data packet received from the device:"
" %2x %2x\n",
data[0], data[1]);
}
}
} else {
- dev_dbg(&priv->udev->dev,
+ dev_dbg(&port->dev,
"Improper amount of data received from the device, "
"%d bytes", urb->actual_length);
}
@@ -219,7 +219,8 @@ static void opticon_write_control_callback(struct urb *urb)
kfree(urb->setup_packet);
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);
spin_lock_irqsave(&priv->lock, flags);