aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/clocksource/timer-of.c12
-rw-r--r--drivers/clocksource/timer-of.h3
2 files changed, 15 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
180void 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}
diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h
index e0d727255f72..44f57e02725d 100644
--- a/drivers/clocksource/timer-of.h
+++ b/drivers/clocksource/timer-of.h
@@ -66,4 +66,7 @@ static inline unsigned long timer_of_period(struct timer_of *to)
66 66
67extern int __init timer_of_init(struct device_node *np, 67extern int __init timer_of_init(struct device_node *np,
68 struct timer_of *to); 68 struct timer_of *to);
69
70extern void timer_of_exit(struct timer_of *to);
71
69#endif 72#endif