I'm failing rmmod lcd_module.ko ERROR: Removing 'lcd_module': Device or resource busy
lssmod give me result: lcd_module [permanent]
how do I cancel this option? I want to load my module more than one time for testing.
thank you开发者_如何学Python on advance.
*if I try to install with modprobe it wont recognize my module.
You have to implement the module_exit
function in your .c
file, like this:
static void __exit myexit(void) {}
module_exit(myexit);
If you haven't already done so before loading your module with insmod
, then the only way to remove that module is rebooting.
Also, you can attempt to force the kernel to remove the module with rmmod -f lcd_module
. Cautionary note: This can cause system failure depending on what kind of resources your module has a hold of and what state its in when you try to force the removal.
精彩评论