Messages in this thread |  | | From | Keith Owens <> | Subject | Re: Unconditional include of <linux/module.h> in aic7xxx driver | Date | Fri, 12 Oct 2001 09:56:34 +1000 |
| |
On Thu, 11 Oct 2001 13:40:08 -0600, "Justin T. Gibbs" <gibbs@scsiguy.com> 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 object.
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 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/
|  |