Re: usb_control_msg() reads 0 bytes in Linux 2.6.23-rc1

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 24 Jul 2007, Pete Zaitcev wrote:

> On Tue, 24 Jul 2007 16:46:21 -0400 (EDT), Alan Stern <[email protected]> wrote:
> 
> >  static int usb_start_wait_urb(struct urb *urb, int timeout, int *actual_length)
> >  { 
> > -	struct completion done;
> > +	struct api_context ctx;
> >  	unsigned long expire;
> >  	int retval;
> > -	int status = urb->status;
> >  
> > -	init_completion(&done); 	
> > -	urb->context = &done;
> > +	init_completion(&ctx.done);
> > +	urb->context = &ctx;
> >  	urb->actual_length = 0;
> >  	retval = usb_submit_urb(urb, GFP_NOIO);
> 
> Oh. My. God.

I'm not quite sure what to make of your reaction.  :-)  Let's see what 
Greg has to say...

Actually, callback structures like this are not at all uncommon.  So 
you shouldn't worry that it looks a little awkward.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.