Originally Posted by wilku
My question is how to automatically load a module when a usb device with a given id is inserted?
I suggest that "UDEV Rules" would be a good way to accomplish what you're doing. You *may* be able to do (some or all of) it by the way you're doing, but I believe that using UDEV Rules would be more appropriate.
The location of your rules directory may be different depending on your distro, but /etc/udev/rules.d or /lib/udev/rules.d are two common locations.
There are loads of LQ threads dealing with udev rules, and also some pretty good tutotials on the 'net about this topic as well. See Google.
In a udev rule, you can use that 'modalias' value, provided it is unique from all modaliases of your other devices, as part of the matching criteria, and tell udev to insert the usbhid driver when it finds this device, as well as any other things you wish to perform when the device is connected (run a script, issue some commands, etc..).
Best of luck, whichever way you go.