On Wed, 29 Nov 2006, Sylvain Munaut wrote:

> Alan Stern wrote:
> > There are two things I don't like about your change.  First, you've added 
> > a lot of new global symbols.  That's not _too_ bad in itself, but it would 
> > be better if you could avoid it.
> >
> > Second, you've changed the way the driver appears to userspace.  Now 
> > instead of loading ohci-hcd, people will have to load ohci-hcd-pci.  Or in 
> > an initramfs environment, they will have to load both.
> >   
> The two are obviously linked. Splitting into separate modules forces to
> export
> what the glue needs. And also force loading the two modules.
> 
> I see two possible approach :
> 
>  * Keep the multiple module approach,
>     To work around the first issue, since a lot of the symbols are just
> to fill in
>     the hc_driver, it would be possible to just create a function that
> fills it in
>     with default value and then let the user override them.

Or export a template structure with default values which could be copied.

>     For the second issue, the core could auto load the sub modules ...

That won't work without cooperation from userspace.  What if somebody
wants to boot from a USB flash drive?  At startup time there is almost no 
userspace available.

>  * Leave everything in a single module, and somehow implement
>     a ohci_glue_init() and a ohci_glue_exit() that would work as
>     module_init and _exit except it would allow several in the same
> module ...

Or do what Ben H. mentioned: Have the main ohci_init() routine contain a 
bunch of calls to the bus-glue init routines, each one protected by #ifdef
(and the same for ohci_exit).

Alan Stern


-------------------------------------------------------------------------
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

Reply via email to