/* void cleanup_module(void) */ void can_exit(void) { DBGin("cleanup_module"); #ifndef MODULE if (MOD_IN_USE) { printk("Can : device busy, remove delayed\n"); } /* printk("CAN: removed successfully \n"); */ #endif #if LDDK_USE_BLKREQUEST blk_dev[Can_major].request_fn = NULL ; #endif #ifdef LDDK_USE_REGISTER if( unregister_chrdev(Can_major, "Can") != 0 ){ printk("can't unregister Can, device busy \n"); } else { printk("Can successfully removed\n"); } #endif #if LDDK_USE_PROCINFO unregister_procinfo(); #endif #if LDDK_USE_SYSCTL unregister_systables(); #endif DBGout(); }
/* void cleanup_module(void) */ static void __exit can_exit(void) { DBGin("cleanup_module"); #if LDDK_USE_BLKREQUEST blk_dev[Can_major].request_fn = NULL ; #endif #if LDDK_USE_REGISTER unregister_chrdev(Can_major, "can"); #endif #if LDDK_USE_PROCINFO unregister_procinfo(); #endif #if LDDK_USE_SYSCTL unregister_systables(); #endif DBGout(); }