On Wed, 29 Oct 2003, Pete Zaitcev wrote:
> > From: Alan Stern <[EMAIL PROTECTED]>
> > Date: Wed, 29 Oct 2003 16:01:06 -0500 (EST)
>
> > + spin_lock(&hub_event_lock);
> > + hub->urb_active = 0;
> > + if (hub->urb_complete) { /* disconnect or rmmod */
> > + complete(hub->urb_complete);
> > + goto done;
> > + }
>
> > {
> > struct usb_hub *hub = usb_get_intfdata (intf);
> > unsigned long flags;
> > + DECLARE_COMPLETION(urb_complete);
> > + hub->urb_complete = &urb_complete;
>
> hub->urb_complete does not seem to be cleared anywhere.
>
> Why not to keep completion around in the structure?
>
> -- Pete
It's not cleared. It only gets used once, when the hub disconnect()
routine is called. Therefore there's no need to waste space allocating
the completion in the structure, when putting it on the stack will work
just as well.
Alan Stern
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel