diff options
Diffstat (limited to 'include/linux/clocksource.h')
| -rw-r--r-- | include/linux/clocksource.h | 16 |
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 *, | |||
| 339 | 339 | ||
| 340 | extern int clocksource_i8253_init(void); | 340 | extern int clocksource_i8253_init(void); |
| 341 | 341 | ||
| 342 | struct device_node; | 342 | #define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ |
| 343 | typedef void(*clocksource_of_init_fn)(struct device_node *); | 343 | OF_DECLARE_1(clksrc, name, compat, fn) |
| 344 | |||
| 344 | #ifdef CONFIG_CLKSRC_OF | 345 | #ifdef CONFIG_CLKSRC_OF |
| 345 | extern void clocksource_of_init(void); | 346 | extern void clocksource_of_init(void); |
| 346 | |||
| 347 | #define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ | ||
| 348 | static const struct of_device_id __clksrc_of_table_##name \ | ||
| 349 | __used __section(__clksrc_of_table) \ | ||
| 350 | = { .compatible = compat, \ | ||
| 351 | .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } | ||
| 352 | #else | 347 | #else |
| 353 | static inline void clocksource_of_init(void) {} | 348 | static inline void clocksource_of_init(void) {} |
| 354 | #define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ | ||
| 355 | static const struct of_device_id __clksrc_of_table_##name \ | ||
| 356 | __attribute__((unused)) \ | ||
| 357 | = { .compatible = compat, \ | ||
| 358 | .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } | ||
| 359 | #endif | 349 | #endif |
| 360 | 350 | ||
| 361 | #endif /* _LINUX_CLOCKSOURCE_H */ | 351 | #endif /* _LINUX_CLOCKSOURCE_H */ |
