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/mon/mon_bin.c | 2 +- drivers/usb/mon/mon_text.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/mon') diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 8a7968df278f..e7fa3644ba6a 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c @@ -422,7 +422,7 @@ static unsigned int mon_bin_get_data(const struct mon_reader_bin *rp, } /* Copy up to the first non-addressable segment */ - for_each_sg(urb->sg->sg, sg, urb->num_sgs, i) { + for_each_sg(urb->sg, sg, urb->num_sgs, i) { if (length == 0 || PageHighMem(sg_page(sg))) break; this_len = min_t(unsigned int, sg->length, length); diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index d56260280f54..a545d65f6e57 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -159,7 +159,7 @@ static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb, if (src == NULL) return 'Z'; /* '0' would be not as pretty. */ } else { - struct scatterlist *sg = urb->sg->sg; + struct scatterlist *sg = urb->sg; if (PageHighMem(sg_page(sg))) return 'D'; -- cgit v1.2.3