From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs•org>
Subject: [PATCH] ppc: Fix PowerBook HD led on ARCH=powerpc
Date: Mon, 07 Nov 2005 16:57:33 +1100 [thread overview]
Message-ID: <1131343053.4652.1.camel@gaston> (raw)
The PowerBook HD led code uses obsoletes device-tree accessors which do
not work anymore for getting the root of the tree.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Index: linux-work/drivers/ide/ppc/pmac.c
===================================================================
--- linux-work.orig/drivers/ide/ppc/pmac.c 2005-11-03 09:40:54.000000000 +1100
+++ linux-work/drivers/ide/ppc/pmac.c 2005-11-07 15:44:05.000000000 +1100
@@ -497,16 +497,19 @@
if (pmu_get_model() != PMU_KEYLARGO_BASED)
return 0;
- dt = find_devices("device-tree");
+ dt = of_find_node_by_path("/");
if (dt == NULL)
return 0;
model = (const char *)get_property(dt, "model", NULL);
if (model == NULL)
return 0;
if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
- strncmp(model, "iBook", strlen("iBook")) != 0)
+ strncmp(model, "iBook", strlen("iBook")) != 0) {
+ of_node_put(dt);
return 0;
-
+ }
+ of_node_put(dt);
+
pmu_blink_on.complete = 1;
pmu_blink_off.complete = 1;
spin_lock_init(&pmu_blink_lock);
reply other threads:[~2005-11-07 5:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1131343053.4652.1.camel@gaston \
--to=benh@kernel$(echo .)crashing.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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