On Wed, 29 Nov 2006, Sylvain Munaut wrote:

> Hello,
> 
> There is a problem when the OHCI module is compiled with multiple bus
> glue as a module.
> Since the glues are #included, if there is several of them, the
> module_init / module_exit causes
> problem. This only happens when in module of course (if not in module
> module_init is
> replaces by some init_call).
> 
> The attached patch is a proposed fix. It only fixes the "PCI" glue, it's
> just a proof of concept.
> If the method is ok for you, I'll do it for all the glues but I didn't
> want to do the change for
> all the 11 bus glues if the method isn't the good one ...
> 
> I've tested with both the PCI bus glues and the OHCI-OF ones (the latter
> one is not yet
> in the official tree) and both compiled fine in module and in kernel.
> 
> The annoying thing is those warnings for each glue :
> drivers/usb/host/ohci.h:606: warning: 'periodic_reinit' defined but not used
> drivers/usb/host/ohci.h:630: warning: 'roothub_a' defined but not used
> drivers/usb/host/ohci.h:636: warning: 'roothub_portstatus' defined but
> not used
> 
> But theses are used by some but not all glues ... I don't know exactly
> why they've
> been put in the .h but unless someone sees an objection, I'll move them
> to ohci-hcd.c
> and just keep the inlines one and the declaration in the .h.

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.

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