patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Lee Jones <lee@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 Daniel Thompson <danielt@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
	 Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	 Christophe Leroy <christophe.leroy@csgroup.eu>,
	 Simona Vetter <simona.vetter@ffwll.ch>,
	linuxppc-dev@lists.ozlabs.org,  patches@lists.linux.dev,
	Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH 1/2] powerpc/powermac: Include linux/of.h in backlight.c
Date: Thu, 25 Sep 2025 19:46:06 -0400	[thread overview]
Message-ID: <20250925-ppc-fixes-for-backlight-fb-h-removal-v1-1-d256858d86a6@kernel.org> (raw)
In-Reply-To: <20250925-ppc-fixes-for-backlight-fb-h-removal-v1-0-d256858d86a6@kernel.org>

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@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


  reply	other threads:[~2025-09-25 23:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 23:46 [PATCH 0/2] Fixes for pmac32_defconfig after fb.h removal from backlight.h Nathan Chancellor
2025-09-25 23:46 ` Nathan Chancellor [this message]
2025-09-26  8:28   ` [PATCH 1/2] powerpc/powermac: Include linux/of.h in backlight.c Christophe Leroy
2025-09-25 23:46 ` [PATCH 2/2] macintosh/via-pmu-backlight: Include linux/of.h and uapi/linux/fb.h Nathan Chancellor
2025-09-26  8:29   ` Christophe Leroy
2025-11-04 12:43   ` Thomas Zimmermann
2025-11-04 17:01     ` Nathan Chancellor
2025-11-04 18:11       ` Thomas Zimmermann
2025-11-04 11:29 ` [PATCH 0/2] Fixes for pmac32_defconfig after fb.h removal from backlight.h Christophe Leroy
2025-11-05  3:50   ` Madhavan Srinivasan
2025-11-04 12:42 ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250925-ppc-fixes-for-backlight-fb-h-removal-v1-1-d256858d86a6@kernel.org \
    --to=nathan@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=danielt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=patches@lists.linux.dev \
    --cc=simona.vetter@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).