[PATCH 1/2] powerpc/powermac: Include linux/of.h in backlight.c
Nathan Chancellor
nathan at kernel.org
Fri Sep 26 09:46:06 AEST 2025
After the recent removal of the fb.h include from backlight.h, which
transitively included of.h, there are several errors in the powermac backlight
driver:
arch/powerpc/platforms/powermac/backlight.c: In function 'pmac_has_backlight_type':
arch/powerpc/platforms/powermac/backlight.c:59:39: error: implicit declaration of function 'of_find_node_by_name'; did you mean 'bus_find_device_by_name'? [-Wimplicit-function-declaration]
59 | struct device_node* bk_node = of_find_node_by_name(NULL, "backlight");
| ^~~~~~~~~~~~~~~~~~~~
| bus_find_device_by_name
arch/powerpc/platforms/powermac/backlight.c:59:39: error: initialization of 'struct device_node *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/powerpc/platforms/powermac/backlight.c:60:17: error: implicit declaration of function 'of_property_match_string' [-Wimplicit-function-declaration]
60 | int i = of_property_match_string(bk_node, "backlight-control", type);
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/powermac/backlight.c:62:9: error: implicit declaration of function 'of_node_put' [-Wimplicit-function-declaration]
62 | of_node_put(bk_node);
| ^~~~~~~~~~~
Explicitly include of.h to resolve the errors.
Fixes: 9f218f9bb9d2 ("backlight: Do not include <linux/fb.h> in header file")
Signed-off-by: Nathan Chancellor <nathan at kernel.org>
---
arch/powerpc/platforms/powermac/backlight.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index 79741370c40c..9afb64723649 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -14,6 +14,7 @@
#include <linux/pmu.h>
#include <linux/atomic.h>
#include <linux/export.h>
+#include <linux/of.h>
#include <asm/backlight.h>
#define OLD_BACKLIGHT_MAX 15
--
2.51.0
More information about the Linuxppc-dev
mailing list