Results 1 to 3 of 3
hi, I'm new in linux device drivers.
I wrote a drvier successfully compiled.
but some errors appeared when inserting, testing and removing modules.
Error messages are as below.
>>insmod myleddrv.ko
...
- 06-07-2007 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 2
Need help on device drivers
hi, I'm new in linux device drivers.
I wrote a drvier successfully compiled.
but some errors appeared when inserting, testing and removing modules.
Error messages are as below.
>>insmod myleddrv.ko
insmod: error inserting 'myleddrv.ko': -1 File exists
>>mknod /dev/myleddrv c 220 0
>>./mydrv_test.o (this is the test program)
test!
cannot open device!
: No such device or address
>>rmmod myleddrv
ERROR: Module myleddrv is in use
Could anybody help me on this? Thanks a lot.
- 06-07-2007 #2Just Joined!
- Join Date
- Jun 2007
- Posts
- 2
the above problem is solved.
but , i'm facing another problem.
I can successfully insert the module and open this device by a test program.
However,when I try to remove this module, after typing "rmmod mydrv", the system got panic.
Would the reason of this problem be that other programs still are accessing its device file?
How to check before removing devices?
plz help me .
thanks for the info.
- 06-07-2007 #3Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
In /proc/modules there's a value that shows how many processes are using the module (3rd field).
If this number isn't zero, rmmod will fail.
Regards


Reply With Quote