]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix build error in windfarm driver in 4.4 and 4.9
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jun 2020 07:42:04 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jun 2020 07:42:04 +0000 (09:42 +0200)
queue-4.4/drivers-macintosh-fix-memleak-in-windfarm_pm112-driver.patch
queue-4.9/drivers-macintosh-fix-memleak-in-windfarm_pm112-driver.patch

index 056c1ee6e5052d0c735f03a86d3383dd6404b7d2..96a16d75e3e0084f995fb15692567a8c1d663c03 100644 (file)
@@ -51,12 +51,20 @@ Link: https://lore.kernel.org/r/20200423060038.3308530-1-mpe@ellerman.id.au
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
- drivers/macintosh/windfarm_pm112.c |   2+++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
+ drivers/macintosh/windfarm_pm112.c |   22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
 
 --- a/drivers/macintosh/windfarm_pm112.c
 +++ b/drivers/macintosh/windfarm_pm112.c
-@@ -133,14 +133,6 @@ static int create_cpu_loop(int cpu)
+@@ -13,6 +13,7 @@
+ #include <linux/device.h>
+ #include <linux/platform_device.h>
+ #include <linux/reboot.h>
++#include <linux/slab.h>
+ #include <asm/prom.h>
+ #include <asm/smu.h>
+@@ -133,14 +134,6 @@ static int create_cpu_loop(int cpu)
        s32 tmax;
        int fmin;
  
@@ -71,7 +79,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        /* Get FVT params to get Tmax; if not found, assume default */
        hdr = smu_sat_get_sdb_partition(chip, 0xC4 + core, NULL);
        if (hdr) {
-@@ -153,6 +145,16 @@ static int create_cpu_loop(int cpu)
+@@ -153,6 +146,16 @@ static int create_cpu_loop(int cpu)
        if (tmax < cpu_all_tmax)
                cpu_all_tmax = tmax;
  
@@ -88,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        /*
         * Darwin has a minimum fan speed of 1000 rpm for the 4-way and
         * 515 for the 2-way.  That appears to be overkill, so for now,
-@@ -175,6 +177,9 @@ static int create_cpu_loop(int cpu)
+@@ -175,6 +178,9 @@ static int create_cpu_loop(int cpu)
                pid.min = fmin;
  
        wf_cpu_pid_init(&cpu_pid[cpu], &pid);
index 056c1ee6e5052d0c735f03a86d3383dd6404b7d2..96a16d75e3e0084f995fb15692567a8c1d663c03 100644 (file)
@@ -51,12 +51,20 @@ Link: https://lore.kernel.org/r/20200423060038.3308530-1-mpe@ellerman.id.au
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
- drivers/macintosh/windfarm_pm112.c |   2+++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
+ drivers/macintosh/windfarm_pm112.c |   22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
 
 --- a/drivers/macintosh/windfarm_pm112.c
 +++ b/drivers/macintosh/windfarm_pm112.c
-@@ -133,14 +133,6 @@ static int create_cpu_loop(int cpu)
+@@ -13,6 +13,7 @@
+ #include <linux/device.h>
+ #include <linux/platform_device.h>
+ #include <linux/reboot.h>
++#include <linux/slab.h>
+ #include <asm/prom.h>
+ #include <asm/smu.h>
+@@ -133,14 +134,6 @@ static int create_cpu_loop(int cpu)
        s32 tmax;
        int fmin;
  
@@ -71,7 +79,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        /* Get FVT params to get Tmax; if not found, assume default */
        hdr = smu_sat_get_sdb_partition(chip, 0xC4 + core, NULL);
        if (hdr) {
-@@ -153,6 +145,16 @@ static int create_cpu_loop(int cpu)
+@@ -153,6 +146,16 @@ static int create_cpu_loop(int cpu)
        if (tmax < cpu_all_tmax)
                cpu_all_tmax = tmax;
  
@@ -88,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        /*
         * Darwin has a minimum fan speed of 1000 rpm for the 4-way and
         * 515 for the 2-way.  That appears to be overkill, so for now,
-@@ -175,6 +177,9 @@ static int create_cpu_loop(int cpu)
+@@ -175,6 +178,9 @@ static int create_cpu_loop(int cpu)
                pid.min = fmin;
  
        wf_cpu_pid_init(&cpu_pid[cpu], &pid);