your solution seems did not work for me.
I followed your steps, and it still failed with
"insmod: error inserting './g_hid.ko': -1 Invalid module format"
then, I found out the kernel that I am building is not the same version as the one I run the insmod command, so I rebuilt again.
but this time, I got
"insmod: error inserting './g_hid.ko': -1 No such device"
what could I be wrong? can you help?
also, both situations, I got message
"drivers/usb/gadget/hid.c:159:31: warning: ‘my_hid’ defined but not used [-Wunused-variable]"
from compiler, does this means the two structures added has not been used at all?
Last edited by damienwei; 09-04-2012 at 12:48 AM.
Reason: not really fixed.