Skip to content

Commit

Permalink
[PATCH] ppc: Fix PowerBook HD led on ARCH=powerpc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Nov 8, 2005
1 parent 7b007de commit 42596ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 42596ec

Please sign in to comment.