summaryrefslogtreecommitdiff
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-05-28 11:23:39 -0500
committerRob Herring <robh@kernel.org>2014-05-28 11:23:39 -0500
commit728dd198aa543397c88f6f8e35f4f187b2bbc09d (patch)
treed9f93149b69c3ece5849243a2836fbc511d3aae4 /include/linux/clocksource.h
parente723e4429983333c6fbd3848de50333834d5e89c (diff)
parent45e0f0f5684327a72866a34aedc3fcf8eec51889 (diff)
Merge branch 'earlycon-dt' into for-next
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 67301a405712..a16b497d5159 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -339,23 +339,13 @@ extern int clocksource_mmio_init(void __iomem *, const char *,
extern int clocksource_i8253_init(void);
-struct device_node;
-typedef void(*clocksource_of_init_fn)(struct device_node *);
+#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
+ OF_DECLARE_1(clksrc, name, compat, fn)
+
#ifdef CONFIG_CLKSRC_OF
extern void clocksource_of_init(void);
-
-#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
- static const struct of_device_id __clksrc_of_table_##name \
- __used __section(__clksrc_of_table) \
- = { .compatible = compat, \
- .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
#else
static inline void clocksource_of_init(void) {}
-#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
- static const struct of_device_id __clksrc_of_table_##name \
- __attribute__((unused)) \
- = { .compatible = compat, \
- .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
#endif
#endif /* _LINUX_CLOCKSOURCE_H */