aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ppc/pmac.c9
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)
497 if (pmu_get_model() != PMU_KEYLARGO_BASED) 497 if (pmu_get_model() != PMU_KEYLARGO_BASED)
498 return 0; 498 return 0;
499 499
500 dt = find_devices("device-tree"); 500 dt = of_find_node_by_path("/");
501 if (dt == NULL) 501 if (dt == NULL)
502 return 0; 502 return 0;
503 model = (const char *)get_property(dt, "model", NULL); 503 model = (const char *)get_property(dt, "model", NULL);
504 if (model == NULL) 504 if (model == NULL)
505 return 0; 505 return 0;
506 if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && 506 if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
507 strncmp(model, "iBook", strlen("iBook")) != 0) 507 strncmp(model, "iBook", strlen("iBook")) != 0) {
508 of_node_put(dt);
508 return 0; 509 return 0;
509 510 }
511 of_node_put(dt);
512
510 pmu_blink_on.complete = 1; 513 pmu_blink_on.complete = 1;
511 pmu_blink_off.complete = 1; 514 pmu_blink_off.complete = 1;
512 spin_lock_init(&pmu_blink_lock); 515 spin_lock_init(&pmu_blink_lock);