lkml.org 
[lkml]   [2008]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v4l-dvb-maintainer] 2.6.25 regression: VIDEO_DEV=y/m, I2C=n compile error
On Mon, 28 Jan 2008, Jan Engelhardt wrote:
> On Jan 28 2008 01:05, Trent Piepho wrote:
>
> >Maybe the kernel headers should provide a couple macros for testing
> >configs, since people get it wrong over and over again?
> >
> >#define CONFIG_ON(x) (defined(CONFIG_##x) || defined(CONFIG_##x##_MODULE))
> >#define CONFIG_AVAIABLE(x) (defined(CONFIG_##x) || (defined(MODULE) && defined(CONFIG_##x##_MODULE)))
> ^AVAILABLE(x)
>
> What's the difference between these two?
>
> CONFIG_x_MODULE will never be defined if MODULE is not, so defined(MODULE)
> seems redundant.

You're probably thinking of CONFIG_MODULES, which indicates the kernel
supports module loading. MODULE indicates the current code is being
compiled as a module. The idea is that code compiled in the kernel can't
call modules. Generally what you would see is:

#if CONFIG_ON(x)
code that will be _used by_ x
probably want x to depend on us in Kconfig
#endif
#if CONFIG_AVAILABLE(x)
code that wants _to use_ x
#endif


\
 
 \ /
  Last update: 2008-02-01 20:27    [W:0.104 / U:1.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site