Can't cleanly unload driver

Eric Fowler eric.fowler at gmail.com
Thu Dec 26 20:50:52 EST 2013


I am trying to load/unload a basic driver skeleton.

I did an insmod ./mydriver.ko
, then a
mknod /dev/mydriver0 c <major #> 0
, then a
ln -sf mydriver0 /dev/mydriver

All is well. Now to unload

rmmod mydriver
rm -f /dev/mydriver
rm -f /dev/mydriver0

But rmmod reports Module mydriver is not currently loaded.

But it is in /proc/devices:
248 mydriver

Trying to reload it gives:
insmod ./mydriver.ko

Could not insert module mydriver.ko: File exists.

I could reboot .... again ... but what is wrong?

I have source for the driver, as I am developing it.

WS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131226/6e80c7a3/attachment-0001.html 


More information about the Kernelnewbies mailing list