lkml.org 
[lkml]   [2001]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.036 / U:1.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site