Messages in this thread |  | | Date | Thu, 11 Oct 2001 14:57:40 -0500 (CDT) | From | Jeff Garzik <> | Subject | Re: Unconditional include of <linux/module.h> in aic7xxx driver |
| |
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 rule.
Similarly you can include linux/pci.h even if !CONFIG_PCI.
Jeff
- 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/
|  |