Patch "arch/powerpc: Remove <linux/fb.h> from backlight code" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    arch/powerpc: Remove <linux/fb.h> from backlight code

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arch-powerpc-remove-linux-fb.h-from-backlight-code.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 76ee4e092c22f0635b212796bbbc97682f97ce25
Author: Thomas Zimmermann <tzimmermann@xxxxxxx>
Date:   Wed Mar 6 13:28:20 2024 +0100

    arch/powerpc: Remove <linux/fb.h> from backlight code
    
    [ Upstream commit 838f865802b9f26135ea7df4e30f89ac2f50c23e ]
    
    Replace <linux/fb.h> with a forward declaration in <asm/backlight.h> to
    resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup()
    and struct fb_info from source and header files. The function and the
    framebuffer struct are unused. No functional changes.
    
    v3:
            * Add Fixes tag (Christophe)
            * fix typos in commit message (Jani)
    
    Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes")
    Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> # (powerpc)
    Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-4-tzimmermann@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h
index 1b5eab62ed047..061a910d74929 100644
--- a/arch/powerpc/include/asm/backlight.h
+++ b/arch/powerpc/include/asm/backlight.h
@@ -10,15 +10,14 @@
 #define __ASM_POWERPC_BACKLIGHT_H
 #ifdef __KERNEL__
 
-#include <linux/fb.h>
 #include <linux/mutex.h>
 
+struct backlight_device;
+
 /* For locking instructions, see the implementation file */
 extern struct backlight_device *pmac_backlight;
 extern struct mutex pmac_backlight_mutex;
 
-extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
-
 extern int pmac_has_backlight_type(const char *type);
 
 extern void pmac_backlight_key(int direction);
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index 32224cb489d75..eab339d2059d5 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -9,7 +9,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/fb.h>
 #include <linux/backlight.h>
 #include <linux/adb.h>
 #include <linux/pmu.h>
@@ -73,31 +72,6 @@ int pmac_has_backlight_type(const char *type)
 	return 0;
 }
 
-int pmac_backlight_curve_lookup(struct fb_info *info, int value)
-{
-	int level = (FB_BACKLIGHT_LEVELS - 1);
-
-	if (info && info->bl_dev) {
-		int i, max = 0;
-
-		/* Look for biggest value */
-		for (i = 0; i < FB_BACKLIGHT_LEVELS; i++)
-			max = max((int)info->bl_curve[i], max);
-
-		/* Look for nearest value */
-		for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) {
-			int diff = abs(info->bl_curve[i] - value);
-			if (diff < max) {
-				max = diff;
-				level = i;
-			}
-		}
-
-	}
-
-	return level;
-}
-
 static void pmac_backlight_key_worker(struct work_struct *work)
 {
 	if (atomic_read(&kernel_backlight_disabled))




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux