diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2013-03-19 22:59:54 +0100 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2013-03-19 22:59:54 +0100 |
| commit | f8016f1eac1ff7162130f253a41099386558ebc1 (patch) | |
| tree | ef0dc6e802f7d168e746688fd4c4f3c331e8ba3b /include/linux | |
| parent | 5fa2f9af76f780a54f59579e1e71f1e85a9b6c64 (diff) | |
| parent | 4d10f054f7df600ec8a388091c93b2d976920de0 (diff) | |
Merge branches 'prima2/soc' and 'clksrc/cleanup' into prima2/multiplatform
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clocksource.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 27cfda427dd9..ac33184b14fd 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -332,15 +332,23 @@ 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 *); #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 }; + = { .compatible = compat, \ + .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } #else -#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) +static inline void clocksource_of_init(void) {} +#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ + static const struct of_device_id __clksrc_of_table_##name \ + __unused __section(__clksrc_of_table) \ + = { .compatible = compat, \ + .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } #endif #endif /* _LINUX_CLOCKSOURCE_H */ |
