RFC: modules and 2.5

Jeff Garzik
2001-07-03T05:14:11Z

A couple things that would be nice for 2.5 is
- let MOD_INC_USE_COUNT work even when module is built into kernel, and
- let THIS_MODULE exist and be valid even when module is built into
kernel

This introduces bloat into the static kernel for modules which do not
take advantage of this, so perhaps we can make this new behavior
conditional on CONFIG_xxx option. Individual drivers which make use of
the behavior can do something like

dep_tristate 'my driver' CONFIG_MYDRIVER $CONFIG_PCI
if [ "$CONFIG_MYDRIVER" != "n" -a \
"$CONFIG_STATIC_MODULES" != "y" ]; then
define_bool CONFIG_STATIC_MODULES y
fi

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
sense to at least optionally support homogenous module treatment across
static or modular builds.

--
Jeff Garzik | "I respect faith, but doubt is
Building 1024 | what gives you an education."
MandrakeSoft | -- Wilson Mizner