On Fri, 29 Nov 2002, Takashi Iwai wrote: > Hi, > > the attached is my latest patch. > could you check it?
Let's go and make things more complicated (like in my tree on disc): 1) waiting for time when all disconnected applications have closed all file descriptors is a bit problem, because no new/other USB devices can be connected/disconnected; in my tree, I use thread to postpone freeing of snd_card_t structure 2) replace file->f_op with fake operations which allows only original release() callback in snd_card_disconnect(); this point makes things more and more simple than your code (check all accesses), because we need to count only open/release calls 3) the unfinished problem is still: how to behave, if the disconnect event comes in the middle of some code; you're right at this point, the lowlevel driver must handle it Please, remove from your code any checks from ioctl(), poll(), read() / write(). Then commit and I'll merge my tree with yours. Jaroslav ----- Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel