Commit 9b94c90d authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] usbcore: add comment to updated hcd.h

On Fri, 29 Oct 2004, David Brownell wrote:

> Could you add a comment there that the HCD is
> now _required_ to return a pointer that usbcore
> can pass to kfree?  Since that's a layering
> violation (in anticipation of later changes to
> make it not be one!), it's surprising ... and
> in any case, the memory lifecycle is no longer
> described just by the calls in this header!

That's a reasonable request, and here's an extra patch to add the comment.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 56e1e60b
......@@ -191,6 +191,12 @@ struct hc_driver {
int (*get_frame_number) (struct usb_hcd *hcd);
/* memory lifecycle */
/* Note: The absence of hcd_free reflects a temporary situation;
* in the near future hcd_alloc will disappear as well and all
* allocations/deallocations will be handled by usbcore. For the
* moment, drivers are required to return a pointer that the core
* can pass to kfree, i.e., the struct usb_hcd must be the _first_
* member of a larger driver-specific structure. */
struct usb_hcd *(*hcd_alloc) (void);
/* manage i/o requests, device state */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment