diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-11-18 07:23:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-21 16:33:54 -0500 |
commit | e29a7738c531ba33a70cbf78809fb3dc5a0a42db (patch) | |
tree | efa5900a722db0b17ab8e7461bf32f85031ccd49 /drivers/usb/serial/opticon.c | |
parent | 0b8718a264f58b096753e29f7e04f188bf64938e (diff) |
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.c | 11 |
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) | |||
76 | case -ENOENT: | 76 | case -ENOENT: |
77 | case -ESHUTDOWN: | 77 | case -ESHUTDOWN: |
78 | /* this urb is terminated, clean up */ | 78 | /* this urb is terminated, clean up */ |
79 | dev_dbg(&priv->udev->dev, "%s - urb shutting down with status: %d\n", | 79 | dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n", |
80 | __func__, status); | 80 | __func__, status); |
81 | return; | 81 | return; |
82 | default: | 82 | default: |
83 | dev_dbg(&priv->udev->dev, "%s - nonzero urb status received: %d\n", | 83 | dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n", |
84 | __func__, status); | 84 | __func__, status); |
85 | goto exit; | 85 | goto exit; |
86 | } | 86 | } |
@@ -118,14 +118,14 @@ static void opticon_read_bulk_callback(struct urb *urb) | |||
118 | priv->cts = true; | 118 | priv->cts = true; |
119 | spin_unlock_irqrestore(&priv->lock, flags); | 119 | spin_unlock_irqrestore(&priv->lock, flags); |
120 | } else { | 120 | } else { |
121 | dev_dbg(&priv->udev->dev, | 121 | dev_dbg(&port->dev, |
122 | "Unknown data packet received from the device:" | 122 | "Unknown data packet received from the device:" |
123 | " %2x %2x\n", | 123 | " %2x %2x\n", |
124 | data[0], data[1]); | 124 | data[0], data[1]); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | } else { | 127 | } else { |
128 | dev_dbg(&priv->udev->dev, | 128 | dev_dbg(&port->dev, |
129 | "Improper amount of data received from the device, " | 129 | "Improper amount of data received from the device, " |
130 | "%d bytes", urb->actual_length); | 130 | "%d bytes", urb->actual_length); |
131 | } | 131 | } |
@@ -219,7 +219,8 @@ static void opticon_write_control_callback(struct urb *urb) | |||
219 | kfree(urb->setup_packet); | 219 | kfree(urb->setup_packet); |
220 | 220 | ||
221 | if (status) | 221 | if (status) |
222 | dev_dbg(&priv->udev->dev, "%s - nonzero write bulk status received: %d\n", | 222 | dev_dbg(&priv->port->dev, |
223 | "%s - non-zero urb status received: %d\n", | ||
223 | __func__, status); | 224 | __func__, status); |
224 | 225 | ||
225 | spin_lock_irqsave(&priv->lock, flags); | 226 | spin_lock_irqsave(&priv->lock, flags); |