On Tue, Jan 13, 2004 at 11:02:32PM +0100, Nemosoft Unv. wrote: > > Memory needs to be freed up in this function. If not it will either > > leak, or we can easily oops the machine (due to the driver not > > implementing reference counting properly). > > Hmm, that raises the question: which device gets removed first on unplug? > the usb_device or the video_device? This has been indeed quite difficult to > fix in the past, as either device could disappear any time. If this solved > that problem, only the better.
Who knows or cares which one is removed first? Your module better handle either one. That's what this callback is there for. When userspace holds a reference to the video device, you physical device can be removed (causing the usb device to be removed.) You can't clean up your video structure until this callback happens. > Unfortunately, I've had very little time to keep up to date with the > linux-usb-devel list, so I'm not familair with these fundamentel driver > changes. Mea culpa. It's not a USB change, but a V4L change. See the other video drivers for how to do this properly. thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel