#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) /* * In 2.4 we detach from the scsi midlayer before the PCI * layer invokes our remove callback.  No per-instance * detach is provided, so we must reach inside the PCI * subsystem's internals and detach our driver manually. */ if (ahd->dev_softc != NULL) ahd->dev_softc->driver = NULL; #endif 
ahd_platform_free(struct ahd_softc *ahd){	struct ahd_linux_target *targ;	struct ahd_linux_device *dev;	int i, j;	if (ahd->platform_data != NULL) {		del_timer_sync(&ahd->platform_data->completeq_timer);		ahd_linux_kill_dv_thread(ahd);		ahd_teardown_runq_tasklet(ahd);		if (ahd->platform_data->host != NULL) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)			scsi_remove_host(ahd->platform_data->host);#endif			scsi_host_put(ahd->platform_data->host);		}		/* destroy all of the device and target objects */		for (i = 0; i < AHD_NUM_TARGETS; i++) {			targ = ahd->platform_data->targets[i];			if (targ != NULL) {				/* Keep target around through the loop. */				targ->refcount++;				for (j = 0; j < AHD_NUM_LUNS; j++) {					if (targ->devices[j] == NULL)						continue;					dev = targ->devices[j];					ahd_linux_free_device(ahd, dev);				}				/*				 * Forcibly free the target now that				 * all devices are gone.				 */				ahd_linux_free_target(ahd, targ);			}		}		if (ahd->platform_data->irq != AHD_LINUX_NOIRQ)			free_irq(ahd->platform_data->irq, ahd);		if (ahd->tags[0] == BUS_SPACE_PIO		 && ahd->bshs[0].ioport != 0)			release_region(ahd->bshs[0].ioport, 256);		if (ahd->tags[1] == BUS_SPACE_PIO		 && ahd->bshs[1].ioport != 0)			release_region(ahd->bshs[1].ioport, 256);		if (ahd->tags[0] == BUS_SPACE_MEMIO		 && ahd->bshs[0].maddr != NULL) {			iounmap(ahd->bshs[0].maddr);			release_mem_region(ahd->platform_data->mem_busaddr,					   0x1000);		}#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)    		/*		 * In 2.4 we detach from the scsi midlayer before the PCI		 * layer invokes our remove callback.  No per-instance		 * detach is provided, so we must reach inside the PCI		 * subsystem's internals and detach our driver manually.		 */		if (ahd->dev_softc != NULL)			ahd->dev_softc->driver = NULL;#endif		free(ahd->platform_data, M_DEVBUF);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60a13213840296b1e32d6781653a0eaa83d04382/aic79xx_osm.c/clean/drivers/scsi/aic7xxx/aic79xx_osm.c