diff options
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 106301fd2fa5..2911abe550f1 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
@@ -380,18 +380,20 @@ static int __init opal_init(void) | |||
380 | pr_warn("opal: Node not found\n"); | 380 | pr_warn("opal: Node not found\n"); |
381 | return -ENODEV; | 381 | return -ENODEV; |
382 | } | 382 | } |
383 | |||
384 | /* Register OPAL consoles if any ports */ | ||
383 | if (firmware_has_feature(FW_FEATURE_OPALv2)) | 385 | if (firmware_has_feature(FW_FEATURE_OPALv2)) |
384 | consoles = of_find_node_by_path("/ibm,opal/consoles"); | 386 | consoles = of_find_node_by_path("/ibm,opal/consoles"); |
385 | else | 387 | else |
386 | consoles = of_node_get(opal_node); | 388 | consoles = of_node_get(opal_node); |
387 | 389 | if (consoles) { | |
388 | /* Register serial ports */ | 390 | for_each_child_of_node(consoles, np) { |
389 | for_each_child_of_node(consoles, np) { | 391 | if (strcmp(np->name, "serial")) |
390 | if (strcmp(np->name, "serial")) | 392 | continue; |
391 | continue; | 393 | of_platform_device_create(np, NULL, NULL); |
392 | of_platform_device_create(np, NULL, NULL); | 394 | } |
395 | of_node_put(consoles); | ||
393 | } | 396 | } |
394 | of_node_put(consoles); | ||
395 | 397 | ||
396 | /* Find all OPAL interrupts and request them */ | 398 | /* Find all OPAL interrupts and request them */ |
397 | irqs = of_get_property(opal_node, "opal-interrupts", &irqlen); | 399 | irqs = of_get_property(opal_node, "opal-interrupts", &irqlen); |
@@ -422,7 +424,7 @@ void opal_shutdown(void) | |||
422 | 424 | ||
423 | for (i = 0; i < opal_irq_count; i++) { | 425 | for (i = 0; i < opal_irq_count; i++) { |
424 | if (opal_irqs[i]) | 426 | if (opal_irqs[i]) |
425 | free_irq(opal_irqs[i], 0); | 427 | free_irq(opal_irqs[i], NULL); |
426 | opal_irqs[i] = 0; | 428 | opal_irqs[i] = 0; |
427 | } | 429 | } |
428 | } | 430 | } |