[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080203075111.GB19981@uranus.ravnborg.org>
Date: Sun, 3 Feb 2008 08:51:11 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: David Brownell <david-b@...bell.net>
Cc: Ingo Molnar <mingo@...e.hu>, Pavel Machek <pavel@....cz>,
linux-pm@...ts.linux-foundation.org,
kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [linux-pm] sleepy linux self-test
> --- g26.orig/drivers/char/Kconfig
> +++ g26/drivers/char/Kconfig
> @@ -715,9 +715,12 @@ config NVRAM
> To compile this driver as a module, choose M here: the
> module will be called nvram.
>
> +comment "You are using the RTC framework, not the legacy CMOS RTC driver"
> + depends on RTC_DRV_CMOS
> +
> config RTC
> tristate "Enhanced Real Time Clock Support"
> - depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV && !ARM && !SUPERH && !S390
> + depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV && !ARM && !SUPERH && !S390 && !RTC_DRV_CMOS
This looks like a prime candidate for a HAVE_RTC config variable
So you do:
config RTC
tristate "Enhanced Real Time Clock Support"
+ depends on HAVE_RTC && !RTC_DEV_CMOS
config HAVE_RTC
bool
(No "depends on" allowed!)
And then the architectures that do support the RTC Framework do an:
(arch/x86/Kconfig as an example):
config X86
+ select HAVE_RTC
So when PPC suddenly supports it they add this single
select statement and no more Kconfig magic needed.
See Documentation/kbuild/kconfig-language.txt for a bit more elaborate
description.
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists