clocksource: always define CLOCKSOURCE_OF_DECLARE
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
@@ -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
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 #ifdefCONFIG_CLKSRC_OF, which simplifies their code.Signed-off-by Stephen Warren <[email protected]>---
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