On Tue, Jul 05, 2005 at 07:39:49PM +0530, Jayaprakash Shanmugam wrote:
> Thanks for your reply.  I just wanted to give some more information on
> my requirement.
> 
> 1) In my driver (working in 2.4), I have fixed minor numbers for the
> USB cards (custom devices).  While reading or writing, I simply do the
> following:
> 
> MyCard = MINOR (pstFilp->f_dentry->d_inode->i_rdev);
> if (MyCard == 64)
> {
> MyDevice = usb_find_device(MyCardVID, MyCardPID);
> usb_control_msg();
> }
> else if ()
> ......
> 
> But if I use usb_register_dev(), it assigns the minors dynamically and
> no way ( as far as I know ) I can get which device ( I have four
> devices and I am sure that they will not have PIDs in common ) the
> read / write is operating on.

You can check the minor number when you register the device.  It is
returned in the structure after usb_register_dev() is called.

> 2) For your reply:
> 
> It is our own control system - both the host and devices. These are
> the only devices that can go and plug into the host's USB port.  
> There cannot be two boards with same VID / PID pair.
> 
> 3) Can I use devfs_register in 2.6 kernel ? The /proc/kallsyms doesnt
> display this symbol.  I tried using devfs_mk_cdev() in probe. But I
> got "No Such Device" while opening.

devfs is gone in the latest 2.6 kernel, so no, you can't use it.

Good luck,

greg k-h


-------------------------------------------------------
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_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to