Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/clocksource/timer-stm32.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ drivers/clocksource/timer-stm32.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/clocksource/timer-stm32.c
+++ b/drivers/clocksource/timer-stm32.c
-@@ -106,6 +106,10 @@ static int __init stm32_clockevent_init(
+@@ -16,6 +16,7 @@
+ #include <linux/of_irq.h>
+ #include <linux/clk.h>
+ #include <linux/reset.h>
++#include <linux/slab.h>
+
+ #define TIM_CR1 0x00
+ #define TIM_DIER 0x0c
+@@ -106,6 +107,10 @@ static int __init stm32_clockevent_init(
unsigned long rate, max_delta;
int irq, ret, bits, prescaler = 1;
clk = of_clk_get(np, 0);
if (IS_ERR(clk)) {
ret = PTR_ERR(clk);
-@@ -156,8 +160,8 @@ static int __init stm32_clockevent_init(
+@@ -156,8 +161,8 @@ static int __init stm32_clockevent_init(
writel_relaxed(prescaler - 1, data->base + TIM_PSC);
writel_relaxed(TIM_EGR_UG, data->base + TIM_EGR);
data->periodic_top = DIV_ROUND_CLOSEST(rate, prescaler * HZ);
-@@ -184,6 +188,7 @@ err_iomap:
+@@ -184,6 +189,7 @@ err_iomap:
err_clk_enable:
clk_put(clk);
err_clk_get: