[Linux1394-cvslog] rev 647 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <dde...@li...> - 2002-10-26 18:46:02
|
Author: ddennedy Date: 2002-10-26 14:45:56 -0400 (Sat, 26 Oct 2002) New Revision: 647 Modified: trunk/dv1394.c Log: unregister iso tasklets on shutdown; fix multiple non-devfs minors Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-10-26 14:45:57.000000000 -0400 @@ -137,7 +137,7 @@ (will cause undeflows if your machine is too slow!) */ -#define DV1394_DEBUG_LEVEL 0 +#define DV1394_DEBUG_LEVEL 1 /* for debugging use ONLY: allow more than one open() of the device */ /* #define DV1394_ALLOW_MORE_THAN_ONE_OPEN 1 */ @@ -1408,6 +1408,16 @@ } spin_unlock_irqrestore(&video->spinlock, flags); + + /* remove tasklets */ + if(video->ohci_it_ctx != -1) { + ohci1394_unregister_iso_tasklet(video->ohci, &video->it_tasklet); + video->ohci_it_ctx = -1; + } + if(video->ohci_ir_ctx != -1) { + ohci1394_unregister_iso_tasklet(video->ohci, &video->ir_tasklet); + video->ohci_ir_ctx = -1; + } /* release the ISO channel */ if(video->channel != -1) { @@ -2108,7 +2118,7 @@ struct video_card *p; list_for_each(lh, &dv1394_cards) { p = list_entry(lh, struct video_card, list); - if((p->id >> 2) == ieee1394_file_to_instance(file)) { + if((p->id) == ieee1394_file_to_instance(file)) { video = p; break; } @@ -2828,6 +2838,10 @@ /* lower 2 bits of id indicate which of four "plugs" per host */ video->id = ohci->id << 2; + if (format == DV1394_NTSC) + video->id |= mode; + else + video->id |= 2 + mode; video->ohci_it_ctx = -1; video->ohci_ir_ctx = -1; @@ -2876,10 +2890,6 @@ list_add_tail(&video->list, &dv1394_cards); spin_unlock_irqrestore(&dv1394_cards_lock, flags); - if (format == DV1394_NTSC) - video->id |= mode; - else video->id |= 2 + mode; - #ifdef CONFIG_DEVFS_FS if (dv1394_devfs_add_entry(video) < 0) goto err_free; |