Oliver Neukum wrote:
Then, after 'insmod ./ekey.o' and plug in my device, I do this:
int hDevice = open("/dev/usb/ekey0", O_RDONLY);
But, hDevice is always -1. What's wrong with my driver?
Does /proc/bus/usb/devices show your driver bound to the device?
How to know this? with 'ls -l'?
I can
> Then, after 'insmod ./ekey.o' and plug in my device, I do this:
> int hDevice = open("/dev/usb/ekey0", O_RDONLY);
> But, hDevice is always -1. What's wrong with my driver?
Does /proc/bus/usb/devices show your driver bound to the device?
Regards
Oliver
--
In my driver, I do this:
static struct usb_driver g_EKEY_driver =
{
.owner = THIS_MODULE,
.name = "ekey",
.probe = EKEY_Probe,
.disconnect = EKEY_Disconnect,
.fops = &g_EKEY_fops,