Can't cleanly unload driver

From: Eric Fowler <hidden>
Date: 2013-12-27 01:50:52

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 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help