Re: Unconditional include of <linux/module.h> in aic7xxx driver

From: Keith Owens (
Date: Thu Oct 11 2001 - 18:56:34 EST

On Thu, 11 Oct 2001 13:40:08 -0600,
"Justin T. Gibbs" <> wrote:
>Can anyone comment on why the include of <linux/module.h> is now
>unconditional in the aic7xxx driver? Assuming MODULE_LICENSE is
>properly qualified by an #ifdef MODULE, the driver appears to compile
>and function correctly without this include. Are MODULE attributes
>(MODULE_VERSION/AUTHOR/DESCRIPTION/etc.) now supposed to be included in
>static configurations?

Absolutely. module.h detects how the code is being compiled and most
of the macros become noops. In 2.5 MODULE_PARM will have meaning even
for code built into the kernel, so we get a consistent method of
setting parameters without adding boot line parsing code to every

Always include module.h, never condition MODULE_xxx on CONFIG_MODULES,
init and exit functions should be defined as __init and __exit and
referenced via module_init() and module_exit(). init.h and module.h
will do whatever is necessary, depending on how the code is compiled.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:42 EST