/* * mwave_init is called on module load * * mwave_exit is called on module unload * mwave_exit is also used to clean up after an aborted mwave_init */ static void mwave_exit(void) { pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n"); #if 0 for (i = 0; i < pDrvData->nr_registered_attrs; i++) device_remove_file(&mwave_device, mwave_dev_attrs[i]); pDrvData->nr_registered_attrs = 0; if (pDrvData->device_registered) { device_unregister(&mwave_device); pDrvData->device_registered = FALSE; } #endif if ( pDrvData->sLine >= 0 ) { serial8250_unregister_port(pDrvData->sLine); } if (pDrvData->bMwaveDevRegistered) { misc_deregister(&mwave_misc_dev); } if (pDrvData->bDSPEnabled) { tp3780I_DisableDSP(&pDrvData->rBDData); } if (pDrvData->bResourcesClaimed) { tp3780I_ReleaseResources(&pDrvData->rBDData); } if (pDrvData->bBDInitialized) { tp3780I_Cleanup(&pDrvData->rBDData); } PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit exit\n"); }
/* * mwave_init is called on module load * * mwave_exit is called on module unload * mwave_exit is also used to clean up after an aborted mwave_init */ static void mwave_exit(void) { pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n"); if (pDrvData->bProcEntryCreated) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) remove_proc_entry("mwave", NULL); #else proc_unregister(&proc_root, mwave_proc.low_ino); #endif } if ( pDrvData->sLine >= 0 ) { unregister_serial(pDrvData->sLine); } if (pDrvData->bMwaveDevRegistered) { misc_deregister(&mwave_misc_dev); } if (pDrvData->bDSPEnabled) { tp3780I_DisableDSP(&pDrvData->rBDData); } if (pDrvData->bResourcesClaimed) { tp3780I_ReleaseResources(&pDrvData->rBDData); } if (pDrvData->bBDInitialized) { tp3780I_Cleanup(&pDrvData->rBDData); } PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit exit\n"); }