diff options
author | Matthew Wilcox <matthew@wil.cx> | 2010-05-01 14:20:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:41 -0400 |
commit | 910f8d0cede74beff1eee93cf9cf2a28d7600e66 (patch) | |
tree | 663cd91c3d4ca2a71937b0dcaad51b02cae3c9c6 /drivers/usb/core/message.c | |
parent | 1e429018b646bdf903554e92ead1cda96cc552dc (diff) |
USB: Change the scatterlist type in struct urb
Change the type of the URB's 'sg' pointer from a usb_sg_request to
a scatterlist. This allows drivers to submit scatter-gather lists
without using the usb_sg_wait() interface. It has the added benefit
of removing the typecasts that were added as part of patch as1368 (and
slightly decreasing the number of pointer dereferences).
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r-- | drivers/usb/core/message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index d8329eb47d4..63919b8abee 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -413,7 +413,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, | |||
413 | sg->length; | 413 | sg->length; |
414 | } | 414 | } |
415 | } | 415 | } |
416 | io->urbs[0]->sg = io; | 416 | io->urbs[0]->sg = sg; |
417 | io->urbs[0]->num_sgs = io->entries; | 417 | io->urbs[0]->num_sgs = io->entries; |
418 | io->entries = 1; | 418 | io->entries = 1; |
419 | } else { | 419 | } else { |
@@ -454,7 +454,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, | |||
454 | } | 454 | } |
455 | io->urbs[i]->transfer_buffer_length = len; | 455 | io->urbs[i]->transfer_buffer_length = len; |
456 | 456 | ||
457 | io->urbs[i]->sg = (struct usb_sg_request *) sg; | 457 | io->urbs[i]->sg = sg; |
458 | } | 458 | } |
459 | io->urbs[--i]->transfer_flags &= ~URB_NO_INTERRUPT; | 459 | io->urbs[--i]->transfer_flags &= ~URB_NO_INTERRUPT; |
460 | } | 460 | } |