Re: test10-pre7

Jeff Garzik
2000-10-30T22:15:04Z

Keith Owens wrote:
>
> On Mon, 30 Oct 2000 17:01:20 -0500,
> Jeff Garzik <jgarzik@mandrakesoft.com> wrote:
> >Keith Owens wrote:
> >> USB still gets unresolved symbols when part is in kernel, part is in
> >> modules and modversions are set. Patch against 2.4.0-test10-pre7, only
> >> affects drivers/usb/Makefile.
> >
> >Or instead of all that, you could simply call the core init function
> >from init/main.c...
>
> Does that work when all of usb is a module? The point of __initcall is
> to avoid all the conditional code that used to be in main.c.

When all of usb is a module, there are no initcalls.

If you need static initialization for in-kernel init, here is the
shortest solution I can come up with:

/********************* usb.c **********************/

int usbcore_init() {...}

#ifdef MODULE
module_init(usbcore_init);
#endif
module_exit(usbcore_exit);

/******************** main.c ******************/

extern int usbcore_init (void);
/* ... */
#ifdef CONFIG_USB
usbcore_init();
#endif

--
Jeff Garzik | "Mind if I drive?" -Sam
Building 1024 | "Not if you don't mind me clawing at the
MandrakeSoft | dash and shrieking like a cheerleader."
| -Max