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

From: Jeff Garzik (
Date: Thu Oct 11 2001 - 14:57:40 EST

On Thu, 11 Oct 2001, 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?

linux/module.h has been set up, for a long while now, to support
building statically into the kernel as well as building as a module.

Linux kernel rule #812: ifdefs are ugly. Strive to make your code
ifdef free by creating includes/defines/inline functions that exist
even when your selected ifdef is undefined. module.h follows that

Similarly you can include linux/pci.h even if !CONFIG_PCI.


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:41 EST