summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-05-31 16:25:59 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-06-28 10:19:17 +0200
commitb7c4db861683af5fc50ac3cb3751cf847d765211 (patch)
treed99dd70e66b503d06d933f12e2ab3b994ba30dab /include/linux
parentc35d9292fee0474a1a037f75b0b85af32200c76f (diff)
clocksource/drivers/clksrc-probe: Introduce init functions with return code
Currently, the clksrc-probe is not able to handle any error from the init functions. There are different issues with the current code: - the code is duplicated in the init functions by writing error - every driver tends to panic in its own init function - counting the number of clocksources is not reliable This patch adds another table to store the functions returning an error. The table is temporary while we convert all the drivers to return an error and will disappear. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clocksource.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 44a1aff22566..15c3839850f4 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -246,6 +246,9 @@ extern int clocksource_i8253_init(void);
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
OF_DECLARE_1(clksrc, name, compat, fn)
+#define CLOCKSOURCE_OF_DECLARE_RET(name, compat, fn) \
+ OF_DECLARE_1_RET(clksrc_ret, name, compat, fn)
+
#ifdef CONFIG_CLKSRC_PROBE
extern void clocksource_probe(void);
#else