From 910f8d0cede74beff1eee93cf9cf2a28d7600e66 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Sat, 1 May 2010 12:20:01 -0600 Subject: 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 Reviewed-by: Alan Stern Tested-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/core/message.c') diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index d8329eb..63919b8 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, sg->length; } } - io->urbs[0]->sg = io; + io->urbs[0]->sg = sg; io->urbs[0]->num_sgs = io->entries; io->entries = 1; } else { @@ -454,7 +454,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, } io->urbs[i]->transfer_buffer_length = len; - io->urbs[i]->sg = (struct usb_sg_request *) sg; + io->urbs[i]->sg = sg; } io->urbs[--i]->transfer_flags &= ~URB_NO_INTERRUPT; } -- cgit v1.1