Hi Jeff,
What use are module use counts, if not used to prevent unloading?
> The reasoning behind this is that module use counts are useful sometimes
> even when the driver is built into the kernel. Other facilities like
> inter_xxx are [obviously] useful when built into the kernel, so it makes
Let's be clear: inter_module_xxx is Broken as Designed. It's a
terrible interface that has the added merit of being badly
implemented.
If you have a module B which has a soft dependency ("must use if
there") on module A, inter_xxx doesn't help without opening a can of
worms (if module B inserted after module A, oops).
The best ways out of this are:
1) Create two versions of module B: an A+B one, and a B-alone one.
2) Place infrastructure in the core kernel.
(This is what I did for ipt_REJECT needing to know about NAT).
Also, I far prefer the simplicity of get_symbol and put_symbol.
Cheers,
Rusty.
-- Premature optmztion is rt of all evl. --DK - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/