diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-24 15:42:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:24 -0400 |
commit | e015268d2fcfcaef70a1ec535e6381f75aafbf81 (patch) | |
tree | 03da17d64b3388ca2d39d32398f942f487977b11 /drivers/usb/core | |
parent | 1431d2a44ccf68a547094976f363f94177ab00c6 (diff) |
USB: remove traces of urb->status from usbcore
This patch (as981) removes the remaining nontrivial usages of
urb->status from usbcore.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/devio.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index b9f1edd6af5..e5ad76b4a73 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -71,6 +71,7 @@ struct async { | |||
71 | void __user *userbuffer; | 71 | void __user *userbuffer; |
72 | void __user *userurb; | 72 | void __user *userurb; |
73 | struct urb *urb; | 73 | struct urb *urb; |
74 | int status; | ||
74 | u32 secid; | 75 | u32 secid; |
75 | }; | 76 | }; |
76 | 77 | ||
@@ -310,9 +311,10 @@ static void async_completed(struct urb *urb) | |||
310 | spin_lock(&ps->lock); | 311 | spin_lock(&ps->lock); |
311 | list_move_tail(&as->asynclist, &ps->async_completed); | 312 | list_move_tail(&as->asynclist, &ps->async_completed); |
312 | spin_unlock(&ps->lock); | 313 | spin_unlock(&ps->lock); |
314 | as->status = urb->status; | ||
313 | if (as->signr) { | 315 | if (as->signr) { |
314 | sinfo.si_signo = as->signr; | 316 | sinfo.si_signo = as->signr; |
315 | sinfo.si_errno = as->urb->status; | 317 | sinfo.si_errno = as->status; |
316 | sinfo.si_code = SI_ASYNCIO; | 318 | sinfo.si_code = SI_ASYNCIO; |
317 | sinfo.si_addr = as->userurb; | 319 | sinfo.si_addr = as->userurb; |
318 | kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid, | 320 | kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid, |
@@ -1132,7 +1134,7 @@ static int processcompl(struct async *as, void __user * __user *arg) | |||
1132 | if (as->userbuffer) | 1134 | if (as->userbuffer) |
1133 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) | 1135 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) |
1134 | return -EFAULT; | 1136 | return -EFAULT; |
1135 | if (put_user(urb->status, &userurb->status)) | 1137 | if (put_user(as->status, &userurb->status)) |
1136 | return -EFAULT; | 1138 | return -EFAULT; |
1137 | if (put_user(urb->actual_length, &userurb->actual_length)) | 1139 | if (put_user(urb->actual_length, &userurb->actual_length)) |
1138 | return -EFAULT; | 1140 | return -EFAULT; |
@@ -1246,7 +1248,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
1246 | if (as->userbuffer) | 1248 | if (as->userbuffer) |
1247 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) | 1249 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) |
1248 | return -EFAULT; | 1250 | return -EFAULT; |
1249 | if (put_user(urb->status, &userurb->status)) | 1251 | if (put_user(as->status, &userurb->status)) |
1250 | return -EFAULT; | 1252 | return -EFAULT; |
1251 | if (put_user(urb->actual_length, &userurb->actual_length)) | 1253 | if (put_user(urb->actual_length, &userurb->actual_length)) |
1252 | return -EFAULT; | 1254 | return -EFAULT; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 4c495c4d505..bd08d51d7f4 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -347,11 +347,11 @@ void usb_kick_khubd(struct usb_device *hdev) | |||
347 | static void hub_irq(struct urb *urb) | 347 | static void hub_irq(struct urb *urb) |
348 | { | 348 | { |
349 | struct usb_hub *hub = urb->context; | 349 | struct usb_hub *hub = urb->context; |
350 | int status; | 350 | int status = urb->status; |
351 | int i; | 351 | int i; |
352 | unsigned long bits; | 352 | unsigned long bits; |
353 | 353 | ||
354 | switch (urb->status) { | 354 | switch (status) { |
355 | case -ENOENT: /* synchronous unlink */ | 355 | case -ENOENT: /* synchronous unlink */ |
356 | case -ECONNRESET: /* async unlink */ | 356 | case -ECONNRESET: /* async unlink */ |
357 | case -ESHUTDOWN: /* hardware going away */ | 357 | case -ESHUTDOWN: /* hardware going away */ |
@@ -359,10 +359,10 @@ static void hub_irq(struct urb *urb) | |||
359 | 359 | ||
360 | default: /* presumably an error */ | 360 | default: /* presumably an error */ |
361 | /* Cause a hub reset after 10 consecutive errors */ | 361 | /* Cause a hub reset after 10 consecutive errors */ |
362 | dev_dbg (hub->intfdev, "transfer --> %d\n", urb->status); | 362 | dev_dbg (hub->intfdev, "transfer --> %d\n", status); |
363 | if ((++hub->nerrors < 10) || hub->error) | 363 | if ((++hub->nerrors < 10) || hub->error) |
364 | goto resubmit; | 364 | goto resubmit; |
365 | hub->error = urb->status; | 365 | hub->error = status; |
366 | /* FALL THROUGH */ | 366 | /* FALL THROUGH */ |
367 | 367 | ||
368 | /* let khubd handle things */ | 368 | /* let khubd handle things */ |