diff options
| author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-24 15:41:41 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:23 -0400 |
| commit | 9347d51c52afcf1a77d2104f162cf8a085624c83 (patch) | |
| tree | f128a00eeed69166f5f5a7196a8c1c45c5cc5d92 /drivers/usb/core | |
| parent | 888fda47051716765175d0008450126c837adb32 (diff) | |
USB: reorganize urb->status use in usbmon
This patch (as978) reorganizes the way usbmon uses urb->status. It
now accepts the status value as an argument.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/hcd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/core/hcd.h | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 8b17babf5c..4ac021e42c 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
| @@ -1275,7 +1275,7 @@ void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb) | |||
| 1275 | urb->status = -EREMOTEIO; | 1275 | urb->status = -EREMOTEIO; |
| 1276 | 1276 | ||
| 1277 | unmap_urb_for_dma(hcd, urb); | 1277 | unmap_urb_for_dma(hcd, urb); |
| 1278 | usbmon_urb_complete(&hcd->self, urb); | 1278 | usbmon_urb_complete(&hcd->self, urb, urb->status); |
| 1279 | usb_unanchor_urb(urb); | 1279 | usb_unanchor_urb(urb); |
| 1280 | 1280 | ||
| 1281 | /* pass ownership to the completion handler */ | 1281 | /* pass ownership to the completion handler */ |
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index 745be2566f..729b7a03ac 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h | |||
| @@ -413,7 +413,7 @@ static inline void usbfs_cleanup(void) { } | |||
| 413 | struct usb_mon_operations { | 413 | struct usb_mon_operations { |
| 414 | void (*urb_submit)(struct usb_bus *bus, struct urb *urb); | 414 | void (*urb_submit)(struct usb_bus *bus, struct urb *urb); |
| 415 | void (*urb_submit_error)(struct usb_bus *bus, struct urb *urb, int err); | 415 | void (*urb_submit_error)(struct usb_bus *bus, struct urb *urb, int err); |
| 416 | void (*urb_complete)(struct usb_bus *bus, struct urb *urb); | 416 | void (*urb_complete)(struct usb_bus *bus, struct urb *urb, int status); |
| 417 | /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */ | 417 | /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */ |
| 418 | }; | 418 | }; |
| 419 | 419 | ||
| @@ -432,10 +432,11 @@ static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb, | |||
| 432 | (*mon_ops->urb_submit_error)(bus, urb, error); | 432 | (*mon_ops->urb_submit_error)(bus, urb, error); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb) | 435 | static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, |
| 436 | int status) | ||
| 436 | { | 437 | { |
| 437 | if (bus->monitored) | 438 | if (bus->monitored) |
| 438 | (*mon_ops->urb_complete)(bus, urb); | 439 | (*mon_ops->urb_complete)(bus, urb, status); |
| 439 | } | 440 | } |
| 440 | 441 | ||
| 441 | int usb_mon_register(struct usb_mon_operations *ops); | 442 | int usb_mon_register(struct usb_mon_operations *ops); |
| @@ -446,7 +447,8 @@ void usb_mon_deregister(void); | |||
| 446 | static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb) {} | 447 | static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb) {} |
| 447 | static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb, | 448 | static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb, |
| 448 | int error) {} | 449 | int error) {} |
| 449 | static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb) {} | 450 | static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, |
| 451 | int status) {} | ||
| 450 | 452 | ||
| 451 | #endif /* CONFIG_USB_MON */ | 453 | #endif /* CONFIG_USB_MON */ |
| 452 | 454 | ||
