Hello All,
I have a USB driver that talks to four devices differentiated by their
minor numbers (fixed minor numbers for everyone of the devices)
In 2.4 Kernel - Probe () function :
I used devfs_register() for all the devices as follows:
for (i =0; i <= 4;i++)
{
devfs_register(usb_devfs_handle, "MyDriver",DEVFS_FL_DEFAULT,USB_MAJOR,
USBH_MINOR_BASE+i,S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, &Fops, NULL);
}
I have this code working and planning to migrate to 2.6 kernel.
In 2.6 kernel :
When I looked into the usb-skeleton.c, it is suggested to use the
usb_register_dev() function. My problem here is this function
allocates minor numbers automatically starting from the base and I
dont have control over it ? For eg., If I plug in card 1 and then card
2, I will have minors as 64 for Card 1 and 65 for card 2. If I plug
in card 2 and then card 1, I will have minors as 64 for card 2 and 65
for card 1.
Could you please help me to fix a minor number based on the vendor ID
and product ID of a card ?
Thanks & Regards
Jayaprakash.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel