I too am in support for a single model. Usually modules that depend on the other are designedin such a way that there is not deadlock as what your are facinf. Example the RealTec NIC driver (8139too) depends on a generic NIC driver (mii). so mii is loaded first & then 8139too. So in this case mii is like a master driver & 8139too is like slave. (just for comparison sake). But if its very much needed in your case for modules calling each other, then I suggest the same way - having callback functions.
On 11/23/06, Ranjan Sinha <rnjn.sinha@xxxxxxxxx> wrote:
Hi,
>
> I modified a mac driver and on top of that driver I made a new module.
> The new module manages some information from the mac driver, so, they need
> to communicate each other.
> I don't want to put the new module inside the mac driver.
> So, I got this starage situation:)
> Usually is there not any case that two module have dependency to each other?
>
Umm well it does happen that Module A has dependencies on Module B,
but having interdependencies is well a bit unfortunate on the design
part.
But you can always have a model where module A directly depend on
module B and having module B calling functions of A through
callbacks. This way B can be loaded without requiring module A.
Of course best design would be to avoid this interdependency.
Hope this helps.
--
Ranjan
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
--
With regards,
Prabhat