Re: [RFC] URBs and buffer management
Pete Zaitcev <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On Mon, 04 Jun 2007 10:38:44 +0200, Marcel Holtmann <[email protected]> wrote: > static void urb_destroy(struct kref *kref) > { > struct urb *urb = to_urb(kref); > + > + if (urb->transfer_flags & URB_FREE_BUFFER) > + usb_buffer_free(urb->dev, urb->transfer_buffer_length, > + urb->transfer_buffer, urb->transfer_dma); > + > kfree(urb); > } This looks good to me, although it's useless for the vast majority of drivers, because they use kmalloc, or should use kmalloc, but use usb_buffer_alloc due to confusion. I'm actually wondering now if your driver is one of the latter... -- Pete ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel