Skip to contentSkip to conversation

clocksource: always define CLOCKSOURCE_OF_DECLARE

PATCH New Stephen Warren 2 participants 2 messages Jan 30, 2013 – Feb 1, 2013 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource: always define CLOCKSOURCE_OF_DECLARE

From: Stephen Warren <[email protected]>

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.

---
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(+)
include/linux/clocksource.h +2 -0
index 7944f14..27cfda4 100644
@@ -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 */
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 clocksource: always define CLOCKSOURCE_OF_DECLARE

Quoted 10 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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.

---
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