Re: Question: initdata for modules....

Matthias Urlichs (smurf@noris.de)
22 Dec 1998 06:33:36 +0100


R.E.Wolff@BitWizard.nl (Rogier Wolff) writes:
> What I'd like to do is to have the "firmware" as a separate module
> that can be unloaded after initializing the main driver.
>
> The drawback is that the usage count of the firmware module will stick
> at "1" if my main module is loaded. Can I decrease its usage count
> "by hand" to allow it to unload once I'm done with it?
>
Not a good idea -- the kernel still thinks that your main module depends on
your firmware module and will happily dereference pointers to it after it
vanishes. :-(

What you _could_ do, however, is to explicitly load it with
request_module() from within your init_module function, find the code
which loads the firmware with get_module_symbol(), call it, and forget all
about it.

> Tomorrow: Only 9000 hours to Y2k
>
As of now it's 234 hours until the Euro is introduced. You may envy the
Europeans, as we're going to have twice the fun. :-)

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf@noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
Porsche; there simply is no substitute.
               --Risky Business

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/