diff mbox

clocksource: always define CLOCKSOURCE_OF_DECLARE

Message ID 1359568170-26479-1-git-send-email-swarren@wwwdotorg.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Warren Jan. 30, 2013, 5:49 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

This allows clocksource drivers that support both DT and non-DT to
always invoke macro CLOCKSOURCE_OF_DECLARE(), rather than wrapping
it in a #ifdef CONFIG_CLKSRC_OF, which simplifies their code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
Olof, Arnd, this is based on arm-soc's timer/cleanup branch, which is
probably the best place for this patch.

 include/linux/clocksource.h |    2 ++
 1 file changed, 2 insertions(+)

Comments

Olof Johansson Feb. 1, 2013, 3:57 a.m. UTC | #1
On Wed, Jan 30, 2013 at 10:49:30AM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> This allows clocksource drivers that support both DT and non-DT to
> always invoke macro CLOCKSOURCE_OF_DECLARE(), rather than wrapping
> it in a #ifdef CONFIG_CLKSRC_OF, which simplifies their code.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> Olof, Arnd, this is based on arm-soc's timer/cleanup branch, which is
> probably the best place for this patch.

Applied (to next/cleanup).


-Olof
diff mbox

Patch

diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 7944f14..27cfda4 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -339,6 +339,8 @@  extern void clocksource_of_init(void);
 	static const struct of_device_id __clksrc_of_table_##name	\
 		__used __section(__clksrc_of_table)			\
 		 = { .compatible = compat, .data = fn };
+#else
+#define CLOCKSOURCE_OF_DECLARE(name, compat, fn)
 #endif
 
 #endif /* _LINUX_CLOCKSOURCE_H */