USB: usbmon: fix-up docs and text API for sparse ISO

This is based on a patch that Alan Stern wrote. It did the same simple
thing in both text and binary cases. In the same time, Marton and I
fixed the binary side properly, but this leaves the text to be fixed.
It is not very important due to low maxium data size of text, but
let's add it just for extra correctness.

The pseudocode is too much to keep fixed up, and we have real code
to be used as examples now, so let's drop it too.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Pete Zaitcev
2011-02-03 22:01:36 -07:00
committed by Greg Kroah-Hartman
parent ac8d674178
commit d25bc4db72
2 changed files with 12 additions and 33 deletions

View File

@@ -236,6 +236,9 @@ static void mon_text_event(struct mon_reader_text *rp, struct urb *urb,
fp++;
dp++;
}
/* Wasteful, but simple to understand: ISO 'C' is sparse. */
if (ev_type == 'C')
ep->length = urb->transfer_buffer_length;
}
ep->setup_flag = mon_text_get_setup(ep, urb, ev_type, rp->r.m_bus);