On Sat, Nov 18, 2006 at 10:30:16PM -0800, Sarah Bailey wrote: > On Mon, Nov 13, 2006 at 03:44:31PM -0800, Greg KH wrote: > > On Mon, Nov 13, 2006 at 03:22:35PM -0800, Sarah Bailey wrote: > > > Signed-off-by: Sarah Bailey <[EMAIL PROTECTED]> > > > > This address is different from your "From:" line, should they be the > > same? > > Yes, they should be the same. I had git and mutt configured for two > different addresses, but my git configuration is updated now. > > > > The patch uses the newer way of allocating major numbers to allocate as > > > many minor numbers as the system would need. The host controller file > > > specifies a maximum of 64 USB busses; each one can have 128 devices with > > > 32 physical endpoints. That results in 262,144 minors. I thought about > > > adding minors as each new bus was added (perhaps in usb_register_bus in > > > hcd.c or by registering a new function using usb_register_notify in > > > hcd.c). In the end, I went with the simpler patch. > > > > Hm, how about just using the code in idr.h to just get an arbitrary > > number. That interface will handle giving the numbers back when needed, > > and that way you don't have to rely on the fact that we don't have more > > than 64 USB busses in the system at once. > > > > It should make the code a bit simpler too. > > Here's a patch that addresses your other suggestions, but I didn't quite > understand this one. Are you suggesting that I use the code in idr.h to > dynamically allocate minor numbers? I thought we have to preallocate > minor numbers, because we can't call register_chrdev_region() more than > once. > > I looked for other drivers that use idr.h to handle minor numbers, but I > didn't see any. Can you give me an example?
I've reworked your patch to use idr.h, and got rid of the .h file, and the initialization in usb.c (we can piggy-back off of the initialization of the class, which happens only when needed, instead) and have sent you the updated copy (and the list too). If you have any objections to it (yeah, it is about double the size of your original patch, sorry), please let me know. thanks, greg k-h ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel