diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-11-07 08:57:33 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-08 03:19:51 +0300 |
commit | 42596ec5edc8efb9e24397ef656df7ebb2c4f8d5 (patch) | |
tree | ef58c24c27589f9d157d26be71129b7f8aecc5f5 | |
parent | 7b007de8a90604000329154e87d269db3427d099 (diff) | |
download | linux-42596ec5edc8efb9e24397ef656df7ebb2c4f8d5.tar.xz |
[PATCH] ppc: Fix PowerBook HD led on ARCH=powerpc
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | drivers/ide/ppc/pmac.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index d8c3d8ebad30..b3e65a65d202 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -497,16 +497,19 @@ pmu_hd_blink_init(void) 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); |