#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) static void __exit lcd_linux_cleanup_module(void) #else /* __exit is not defined in 2.2.x kernels */ static void lcd_linux_cleanup_module(void) #endif { #ifdef USE_PROC if (lcd_proc_root) { remove_proc_entry("drivers", lcd_proc_root); remove_proc_entry("lcd", &proc_root); } #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) class_destroy(lcd_linux_class); #endif if (unregister_chrdev(major, LCD_LINUX_STRING)) printk(KERN_ERR "LCD: unregister_chrdev failed\n"); } module_init(lcd_linux_init_module) //module_exit(lcd_linux_cleanup_module)