How to test my usb skeketon driver
So now I have a driver similar to usb-skeleton.c.But I dont know how to remove the previous usb-storage module to test my new module on my usb drive.
whnever I plug-in my usb device dmesg shows active usb-storage module.Do I need to have the device of a specific name like /dev/skeleton.
Your helps are welcome!:D
use of the kernel module tools...
If I understand your question, you need to use the command "rmmod" to remove the current kernel module so you can insert your own.
You should acquaint yourself with the module tools modprobe, lsmod, insmod and rmmod before going much further and have a look at modprobe.conf or whichever system is being used by the kernel to manage the deployment of kernel modules.
use of the module blacklist file
You have to "blacklist" the usb-storage" module by using the modprobe.conf file. Have a look using "man modprobe.conf". You will see how to blacklist a particular module. This will prohibit the module from being loaded automatically. You can then use insmod to load your module.
As I said before, you really should become acquainted with the kernel module's suite of tools if you are going to use write kernel modules.
Problem testing usb-skeleton driver
Well I blacklisted usb-storage module.Iam still having problems testing the code usb-skeleton.c.
I am inserting usb-skeleton module as
but then when i lsmod the module is used by 0.
that means it cannot get the device.
Do I need to craete device entry something like
The usb-skeleton.c I am having is @linuxhq.com/kernel/ v2.6/32/drivers/usb/usb-skeleton.c"]usb-skeleton.c
# mknod -m 666 /dev/skeleton c 32 0
Do I really need to assign a specific device >pls help