]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix build error in 4.9.y patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:55:12 +0000 (20:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:55:12 +0000 (20:55 +0100)
queue-4.9/clocksource-drivers-stm32-fix-kernel-panic-with-multiple-timers.patch

index b573e1e87854e4965fe4f7dcae2efcee61ba1d72..d26a77ba07bd603dbc1e12223e82b0a9c9ca0818 100644 (file)
@@ -48,12 +48,20 @@ Signed-off-by: Ingo Molnar <mingo@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
- drivers/clocksource/timer-stm32.c |    ++++++-
- 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;
  
@@ -64,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        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);
@@ -74,7 +82,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  
        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: