Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of/irq: Use of_msi_get_domain instead of open-coded "msi-parent" parsing

Now that we have a function that implements the complexity of the
"msi-parent" property parsing, switch to that.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

+11 -20
+11 -20
drivers/of/irq.c
··· 580 580 } 581 581 582 582 /** 583 - * of_msi_configure - Set the msi_domain field of a device 584 - * @dev: device structure to associate with an MSI irq domain 585 - * @np: device node for that device 586 - */ 587 - void of_msi_configure(struct device *dev, struct device_node *np) 588 - { 589 - struct device_node *msi_np; 590 - struct irq_domain *d; 591 - 592 - msi_np = of_parse_phandle(np, "msi-parent", 0); 593 - if (!msi_np) 594 - return; 595 - 596 - d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI); 597 - if (!d) 598 - d = irq_find_host(msi_np); 599 - dev_set_msi_domain(dev, d); 600 - } 601 - 602 - /** 603 583 * of_msi_map_rid - Map a MSI requester ID for a device. 604 584 * @dev: device for which the mapping is to be done. 605 585 * @msi_np: device node of the expected msi controller. ··· 720 740 } 721 741 722 742 return NULL; 743 + } 744 + 745 + /** 746 + * of_msi_configure - Set the msi_domain field of a device 747 + * @dev: device structure to associate with an MSI irq domain 748 + * @np: device node for that device 749 + */ 750 + void of_msi_configure(struct device *dev, struct device_node *np) 751 + { 752 + dev_set_msi_domain(dev, 753 + of_msi_get_domain(dev, np, DOMAIN_BUS_PLATFORM_MSI)); 723 754 }