diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2017-10-23 05:58:37 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-10-29 14:05:49 -0400 |
commit | f48729a999ee57b9e831245779e68200dd2bde09 (patch) | |
tree | 2bf773cdd0a33892ba33890e968d927e97fb65c6 /drivers/clocksource/timer-of.c | |
parent | f16ff2bdb135e2eb35488264006b575c476ea597 (diff) |
clocksource/drivers/timer-of: Add timer_of_exit function
The timer-of API does not provide a function to undo what has been done by
the timer_of_init() function.
Add a timer_of_exit() function.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/timer-of.c')
-rw-r--r-- | drivers/clocksource/timer-of.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index c79122d8e10d..7c64a5c1bfc1 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c | |||
@@ -176,3 +176,15 @@ out_fail: | |||
176 | timer_base_exit(&to->of_base); | 176 | timer_base_exit(&to->of_base); |
177 | return ret; | 177 | return ret; |
178 | } | 178 | } |
179 | |||
180 | void timer_of_exit(struct timer_of *to) | ||
181 | { | ||
182 | if (to->flags & TIMER_OF_IRQ) | ||
183 | timer_irq_exit(&to->of_irq); | ||
184 | |||
185 | if (to->flags & TIMER_OF_CLOCK) | ||
186 | timer_clk_exit(&to->of_clk); | ||
187 | |||
188 | if (to->flags & TIMER_OF_BASE) | ||
189 | timer_base_exit(&to->of_base); | ||
190 | } | ||