diff options
-rw-r--r-- | drivers/of/irq.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 4fa916dffc91..a9ea5525109b 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -680,18 +680,6 @@ u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in) | |||
680 | return __of_msi_map_rid(dev, &msi_np, rid_in); | 680 | return __of_msi_map_rid(dev, &msi_np, rid_in); |
681 | } | 681 | } |
682 | 682 | ||
683 | static struct irq_domain *__of_get_msi_domain(struct device_node *np, | ||
684 | enum irq_domain_bus_token token) | ||
685 | { | ||
686 | struct irq_domain *d; | ||
687 | |||
688 | d = irq_find_matching_host(np, token); | ||
689 | if (!d) | ||
690 | d = irq_find_host(np); | ||
691 | |||
692 | return d; | ||
693 | } | ||
694 | |||
695 | /** | 683 | /** |
696 | * of_msi_map_get_device_domain - Use msi-map to find the relevant MSI domain | 684 | * of_msi_map_get_device_domain - Use msi-map to find the relevant MSI domain |
697 | * @dev: device for which the mapping is to be done. | 685 | * @dev: device for which the mapping is to be done. |
@@ -707,7 +695,7 @@ struct irq_domain *of_msi_map_get_device_domain(struct device *dev, u32 rid) | |||
707 | struct device_node *np = NULL; | 695 | struct device_node *np = NULL; |
708 | 696 | ||
709 | __of_msi_map_rid(dev, &np, rid); | 697 | __of_msi_map_rid(dev, &np, rid); |
710 | return __of_get_msi_domain(np, DOMAIN_BUS_PCI_MSI); | 698 | return irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI); |
711 | } | 699 | } |
712 | 700 | ||
713 | /** | 701 | /** |
@@ -731,7 +719,7 @@ struct irq_domain *of_msi_get_domain(struct device *dev, | |||
731 | /* Check for a single msi-parent property */ | 719 | /* Check for a single msi-parent property */ |
732 | msi_np = of_parse_phandle(np, "msi-parent", 0); | 720 | msi_np = of_parse_phandle(np, "msi-parent", 0); |
733 | if (msi_np && !of_property_read_bool(msi_np, "#msi-cells")) { | 721 | if (msi_np && !of_property_read_bool(msi_np, "#msi-cells")) { |
734 | d = __of_get_msi_domain(msi_np, token); | 722 | d = irq_find_matching_host(msi_np, token); |
735 | if (!d) | 723 | if (!d) |
736 | of_node_put(msi_np); | 724 | of_node_put(msi_np); |
737 | return d; | 725 | return d; |
@@ -745,7 +733,7 @@ struct irq_domain *of_msi_get_domain(struct device *dev, | |||
745 | while (!of_parse_phandle_with_args(np, "msi-parent", | 733 | while (!of_parse_phandle_with_args(np, "msi-parent", |
746 | "#msi-cells", | 734 | "#msi-cells", |
747 | index, &args)) { | 735 | index, &args)) { |
748 | d = __of_get_msi_domain(args.np, token); | 736 | d = irq_find_matching_host(args.np, token); |
749 | if (d) | 737 | if (d) |
750 | return d; | 738 | return d; |
751 | 739 | ||