Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c02c800 authored by Grant Likely's avatar Grant Likely
Browse files

of/irq: Rename of_irq_map_* functions to of_irq_parse_*



The OF irq handling code has been overloading the term 'map' to refer to
both parsing the data in the device tree and mapping it to the internal
linux irq system. This is probably because the device tree does have the
concept of an 'interrupt-map' function for translating interrupt
references from one node to another, but 'map' is still confusing when
the primary purpose of some of the functions are to parse the DT data.

This patch renames all the of_irq_map_* functions to of_irq_parse_*
which makes it clear that there is a difference between the parsing
phase and the mapping phase. Kernel code can make use of just the
parsing or just the mapping support as needed by the subsystem.

The patch was generated mechanically with a handful of sed commands.

Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
parent 4a43d686
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -840,9 +840,9 @@ static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
	struct of_irq oirq;
	int ret;

	ret = of_irq_map_pci(dev, &oirq);
	ret = of_irq_parse_pci(dev, &oirq);
	if (ret) {
		dev_err(&dev->dev, "of_irq_map_pci() %d\n", ret);
		dev_err(&dev->dev, "of_irq_parse_pci() %d\n", ret);
		/* Proper return code 0 == NO_IRQ */
		return 0;
	}
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
	memset(&oirq, 0xff, sizeof(oirq));
#endif
	/* Try to get a mapping from the device-tree */
	if (of_irq_map_pci(pci_dev, &oirq)) {
	if (of_irq_parse_pci(pci_dev, &oirq)) {
		u8 line, pin;

		/* If that fails, lets fallback to what is in the config
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
	struct of_irq dev_irq;
	int irq;

	if (of_irq_map_pci(dev, &dev_irq)) {
	if (of_irq_parse_pci(dev, &dev_irq)) {
		dev_err(&dev->dev, "trying to map irq for unknown slot:%d pin:%d\n",
			slot, pin);
		return 0;
+1 −1
Original line number Diff line number Diff line
@@ -587,7 +587,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
	int err;
	int irq;

	err = of_irq_map_pci(dev, &dev_irq);
	err = of_irq_parse_pci(dev, &dev_irq);
	if (err) {
		pr_err("pci %s: unable to get irq map, err=%d\n",
		       pci_name((struct pci_dev *) dev), err);
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
	memset(&oirq, 0xff, sizeof(oirq));
#endif
	/* Try to get a mapping from the device-tree */
	if (of_irq_map_pci(pci_dev, &oirq)) {
	if (of_irq_parse_pci(pci_dev, &oirq)) {
		u8 line, pin;

		/* If that fails, lets fallback to what is in the config
Loading