diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-18 13:58:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-19 20:46:07 -0400 |
commit | 24497a00114ef42a752d614635168db9e2192f5e (patch) | |
tree | eec177f042d52b972f1170c698d96fb159c20986 /drivers/usb/misc | |
parent | 3fc3e8269fa5c1f35b518dbe18dc48acef3c7684 (diff) |
USB: misc: adtux: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/adutux.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index 274d08ecf291..e9fdbc8997b3 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
@@ -179,17 +179,18 @@ static void adu_delete(struct adu_device *dev) | |||
179 | static void adu_interrupt_in_callback(struct urb *urb) | 179 | static void adu_interrupt_in_callback(struct urb *urb) |
180 | { | 180 | { |
181 | struct adu_device *dev = urb->context; | 181 | struct adu_device *dev = urb->context; |
182 | int status = urb->status; | ||
182 | 183 | ||
183 | dbg(4," %s : enter, status %d", __FUNCTION__, urb->status); | 184 | dbg(4," %s : enter, status %d", __FUNCTION__, status); |
184 | adu_debug_data(5, __FUNCTION__, urb->actual_length, | 185 | adu_debug_data(5, __FUNCTION__, urb->actual_length, |
185 | urb->transfer_buffer); | 186 | urb->transfer_buffer); |
186 | 187 | ||
187 | spin_lock(&dev->buflock); | 188 | spin_lock(&dev->buflock); |
188 | 189 | ||
189 | if (urb->status != 0) { | 190 | if (status != 0) { |
190 | if ((urb->status != -ENOENT) && (urb->status != -ECONNRESET)) { | 191 | if ((status != -ENOENT) && (status != -ECONNRESET)) { |
191 | dbg(1," %s : nonzero status received: %d", | 192 | dbg(1," %s : nonzero status received: %d", |
192 | __FUNCTION__, urb->status); | 193 | __FUNCTION__, status); |
193 | } | 194 | } |
194 | goto exit; | 195 | goto exit; |
195 | } | 196 | } |
@@ -217,21 +218,22 @@ exit: | |||
217 | wake_up_interruptible(&dev->read_wait); | 218 | wake_up_interruptible(&dev->read_wait); |
218 | adu_debug_data(5, __FUNCTION__, urb->actual_length, | 219 | adu_debug_data(5, __FUNCTION__, urb->actual_length, |
219 | urb->transfer_buffer); | 220 | urb->transfer_buffer); |
220 | dbg(4," %s : leave, status %d", __FUNCTION__, urb->status); | 221 | dbg(4," %s : leave, status %d", __FUNCTION__, status); |
221 | } | 222 | } |
222 | 223 | ||
223 | static void adu_interrupt_out_callback(struct urb *urb) | 224 | static void adu_interrupt_out_callback(struct urb *urb) |
224 | { | 225 | { |
225 | struct adu_device *dev = urb->context; | 226 | struct adu_device *dev = urb->context; |
227 | int status = urb->status; | ||
226 | 228 | ||
227 | dbg(4," %s : enter, status %d", __FUNCTION__, urb->status); | 229 | dbg(4," %s : enter, status %d", __FUNCTION__, status); |
228 | adu_debug_data(5,__FUNCTION__, urb->actual_length, urb->transfer_buffer); | 230 | adu_debug_data(5,__FUNCTION__, urb->actual_length, urb->transfer_buffer); |
229 | 231 | ||
230 | if (urb->status != 0) { | 232 | if (status != 0) { |
231 | if ((urb->status != -ENOENT) && | 233 | if ((status != -ENOENT) && |
232 | (urb->status != -ECONNRESET)) { | 234 | (status != -ECONNRESET)) { |
233 | dbg(1, " %s :nonzero status received: %d", | 235 | dbg(1, " %s :nonzero status received: %d", |
234 | __FUNCTION__, urb->status); | 236 | __FUNCTION__, status); |
235 | } | 237 | } |
236 | goto exit; | 238 | goto exit; |
237 | } | 239 | } |
@@ -241,7 +243,7 @@ exit: | |||
241 | 243 | ||
242 | adu_debug_data(5, __FUNCTION__, urb->actual_length, | 244 | adu_debug_data(5, __FUNCTION__, urb->actual_length, |
243 | urb->transfer_buffer); | 245 | urb->transfer_buffer); |
244 | dbg(4," %s : leave, status %d", __FUNCTION__, urb->status); | 246 | dbg(4," %s : leave, status %d", __FUNCTION__, status); |
245 | } | 247 | } |
246 | 248 | ||
247 | static int adu_open(struct inode *inode, struct file *file) | 249 | static int adu_open(struct inode *inode, struct file *file) |