while(dvtaskQ_active && --count) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); } 
while(dvtaskQ_active && --count) schedule_timeout_interruptible(1); 
mptscsih_remove(struct pci_dev *pdev){	MPT_ADAPTER 		*ioc = pci_get_drvdata(pdev);	struct Scsi_Host 	*host = ioc->sh;	MPT_SCSI_HOST		*hd;	int 		 	count;	unsigned long	 	flags;	int sz1;	if(!host) {		mpt_detach(pdev);		return;	}	scsi_remove_host(host);	if((hd = (MPT_SCSI_HOST *)host->hostdata) == NULL)		return;#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION	/* Check DV thread active */	count = 10 * HZ;	spin_lock_irqsave(&dvtaskQ_lock, flags);	if (dvtaskQ_active) {		spin_unlock_irqrestore(&dvtaskQ_lock, flags);		while(dvtaskQ_active && --count) {			set_current_state(TASK_INTERRUPTIBLE);			schedule_timeout(1);		}	} else {		spin_unlock_irqrestore(&dvtaskQ_lock, flags);	}	if (!count)		printk(KERN_ERR MYNAM ": ERROR - DV thread still active!\n");#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)	else		printk(KERN_ERR MYNAM ": DV thread orig %d, count %d\n", 10 * HZ, count);#endif#endif	mptscsih_shutdown(pdev);	sz1=0;	if (hd->ScsiLookup != NULL) {		sz1 = hd->ioc->req_depth * sizeof(void *);		kfree(hd->ScsiLookup);		hd->ScsiLookup = NULL;	}	/*	 * Free pointer array.	 */	kfree(hd->Targets);	hd->Targets = NULL;	dprintk((MYIOC_s_INFO_FMT	    "Free'd ScsiLookup (%d) memory\n",	    hd->ioc->name, sz1));	kfree(hd->info_kbuf);	/* NULL the Scsi_Host pointer	 */	hd->ioc->sh = NULL;	scsi_host_put(host);	mpt_detach(pdev);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6521018d4bf9522b4de47254ea15e8c1be1ec00f/mptscsih.c/clean/drivers/message/fusion/mptscsih.c