diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-26 15:47:03 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-26 15:47:03 -0400 |
| commit | 1e1b37273cf719545da50b76f214f983a710aaf4 (patch) | |
| tree | 033f6062325ef7aaeefe8559bb409ab7d2be3c76 /drivers/of | |
| parent | c183a603e8d8a5a189729b77d0c623a3d5950e5f (diff) | |
| parent | c291b015158577be533dd5a959dfc09bab119eed (diff) | |
Merge branch 'x86/urgent' into x86/apic
Bring in the upstream modifications so we can fixup the silent merge
conflict which is introduced by this merge.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/of')
| -rw-r--r-- | drivers/of/base.c | 14 | ||||
| -rw-r--r-- | drivers/of/fdt.c | 2 | ||||
| -rw-r--r-- | drivers/of/irq.c | 5 | ||||
| -rw-r--r-- | drivers/of/platform.c | 2 |
4 files changed, 9 insertions, 14 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 7792266db259..3ce69536a7b3 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -1631,8 +1631,7 @@ static int __of_parse_phandle_with_args(const struct device_node *np, | |||
| 1631 | */ | 1631 | */ |
| 1632 | 1632 | ||
| 1633 | err: | 1633 | err: |
| 1634 | if (it.node) | 1634 | of_node_put(it.node); |
| 1635 | of_node_put(it.node); | ||
| 1636 | return rc; | 1635 | return rc; |
| 1637 | } | 1636 | } |
| 1638 | 1637 | ||
| @@ -2343,20 +2342,13 @@ struct device_node *of_graph_get_endpoint_by_regs( | |||
| 2343 | const struct device_node *parent, int port_reg, int reg) | 2342 | const struct device_node *parent, int port_reg, int reg) |
| 2344 | { | 2343 | { |
| 2345 | struct of_endpoint endpoint; | 2344 | struct of_endpoint endpoint; |
| 2346 | struct device_node *node, *prev_node = NULL; | 2345 | struct device_node *node = NULL; |
| 2347 | |||
| 2348 | while (1) { | ||
| 2349 | node = of_graph_get_next_endpoint(parent, prev_node); | ||
| 2350 | of_node_put(prev_node); | ||
| 2351 | if (!node) | ||
| 2352 | break; | ||
| 2353 | 2346 | ||
| 2347 | for_each_endpoint_of_node(parent, node) { | ||
| 2354 | of_graph_parse_endpoint(node, &endpoint); | 2348 | of_graph_parse_endpoint(node, &endpoint); |
| 2355 | if (((port_reg == -1) || (endpoint.port == port_reg)) && | 2349 | if (((port_reg == -1) || (endpoint.port == port_reg)) && |
| 2356 | ((reg == -1) || (endpoint.id == reg))) | 2350 | ((reg == -1) || (endpoint.id == reg))) |
| 2357 | return node; | 2351 | return node; |
| 2358 | |||
| 2359 | prev_node = node; | ||
| 2360 | } | 2352 | } |
| 2361 | 2353 | ||
| 2362 | return NULL; | 2354 | return NULL; |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 55f1b8391149..085c6389afd1 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
| @@ -517,7 +517,7 @@ static void *__unflatten_device_tree(const void *blob, | |||
| 517 | pr_warning("End of tree marker overwritten: %08x\n", | 517 | pr_warning("End of tree marker overwritten: %08x\n", |
| 518 | be32_to_cpup(mem + size)); | 518 | be32_to_cpup(mem + size)); |
| 519 | 519 | ||
| 520 | if (detached) { | 520 | if (detached && mynodes) { |
| 521 | of_node_set_flag(*mynodes, OF_DETACHED); | 521 | of_node_set_flag(*mynodes, OF_DETACHED); |
| 522 | pr_debug("unflattened tree is detached\n"); | 522 | pr_debug("unflattened tree is detached\n"); |
| 523 | } | 523 | } |
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 89a71c6074fc..a2e68f740eda 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
| @@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches) | |||
| 544 | 544 | ||
| 545 | list_del(&desc->list); | 545 | list_del(&desc->list); |
| 546 | 546 | ||
| 547 | of_node_set_flag(desc->dev, OF_POPULATED); | ||
| 548 | |||
| 547 | pr_debug("of_irq_init: init %s (%p), parent %p\n", | 549 | pr_debug("of_irq_init: init %s (%p), parent %p\n", |
| 548 | desc->dev->full_name, | 550 | desc->dev->full_name, |
| 549 | desc->dev, desc->interrupt_parent); | 551 | desc->dev, desc->interrupt_parent); |
| 550 | ret = desc->irq_init_cb(desc->dev, | 552 | ret = desc->irq_init_cb(desc->dev, |
| 551 | desc->interrupt_parent); | 553 | desc->interrupt_parent); |
| 552 | if (ret) { | 554 | if (ret) { |
| 555 | of_node_clear_flag(desc->dev, OF_POPULATED); | ||
| 553 | kfree(desc); | 556 | kfree(desc); |
| 554 | continue; | 557 | continue; |
| 555 | } | 558 | } |
| @@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches) | |||
| 559 | * its children can get processed in a subsequent pass. | 562 | * its children can get processed in a subsequent pass. |
| 560 | */ | 563 | */ |
| 561 | list_add_tail(&desc->list, &intc_parent_list); | 564 | list_add_tail(&desc->list, &intc_parent_list); |
| 562 | |||
| 563 | of_node_set_flag(desc->dev, OF_POPULATED); | ||
| 564 | } | 565 | } |
| 565 | 566 | ||
| 566 | /* Get the next pending parent that might have children */ | 567 | /* Get the next pending parent that might have children */ |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 8aa197691074..f39ccd5aa701 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
| @@ -497,6 +497,7 @@ int of_platform_default_populate(struct device_node *root, | |||
| 497 | } | 497 | } |
| 498 | EXPORT_SYMBOL_GPL(of_platform_default_populate); | 498 | EXPORT_SYMBOL_GPL(of_platform_default_populate); |
| 499 | 499 | ||
| 500 | #ifndef CONFIG_PPC | ||
| 500 | static int __init of_platform_default_populate_init(void) | 501 | static int __init of_platform_default_populate_init(void) |
| 501 | { | 502 | { |
| 502 | struct device_node *node; | 503 | struct device_node *node; |
| @@ -521,6 +522,7 @@ static int __init of_platform_default_populate_init(void) | |||
| 521 | return 0; | 522 | return 0; |
| 522 | } | 523 | } |
| 523 | arch_initcall_sync(of_platform_default_populate_init); | 524 | arch_initcall_sync(of_platform_default_populate_init); |
| 525 | #endif | ||
| 524 | 526 | ||
| 525 | static int of_platform_device_destroy(struct device *dev, void *data) | 527 | static int of_platform_device_destroy(struct device *dev, void *data) |
| 526 | { | 528 | { |
