diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-15 11:55:53 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 06:42:57 -0400 |
commit | e6d30ab1e7d1281784672c0fc2ffa385cfb7279e (patch) | |
tree | dc50a67ca096c9d71775a3232e0bfcd6f7912735 /arch/powerpc | |
parent | 530210c7814e83564c7ca7bca8192515042c0b63 (diff) |
of/irq: simplify args to irq_create_of_mapping
All the callers of irq_create_of_mapping() pass the contents of a struct
of_phandle_args structure to the function. Since all the callers already
have an of_phandle_args pointer, why not pass it directly to
irq_create_of_mapping()?
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_pciex.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_sio.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/fsl_uli1575.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/event_sources.c | 3 |
7 files changed, 8 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 96c46235fda2..a1e3e40ca3fd 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -266,7 +266,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev) | |||
266 | oirq.args_count, oirq.args[0], oirq.args[1], | 266 | oirq.args_count, oirq.args[0], oirq.args[1], |
267 | of_node_full_name(oirq.np)); | 267 | of_node_full_name(oirq.np)); |
268 | 268 | ||
269 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); | 269 | virq = irq_create_of_mapping(&oirq); |
270 | } | 270 | } |
271 | if(virq == NO_IRQ) { | 271 | if(virq == NO_IRQ) { |
272 | pr_debug(" Failed to map !\n"); | 272 | pr_debug(" Failed to map !\n"); |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index e8d34d1f640d..b3ea96db5b06 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -511,7 +511,7 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
511 | pr_err("PCIEXC:Failed to map irq\n"); | 511 | pr_err("PCIEXC:Failed to map irq\n"); |
512 | goto error; | 512 | goto error; |
513 | } | 513 | } |
514 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); | 514 | virq = irq_create_of_mapping(&oirq); |
515 | if (request_irq(virq, pciex_handle_internal_irq, | 515 | if (request_irq(virq, pciex_handle_internal_irq, |
516 | 0, "pciex", (void *)phb)) { | 516 | 0, "pciex", (void *)phb)) { |
517 | pr_err("PCIEXC:Failed to request irq\n"); | 517 | pr_err("PCIEXC:Failed to request irq\n"); |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c index 06046d512130..c8eb57193826 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_sio.c +++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c | |||
@@ -66,7 +66,7 @@ static int __init txx9_serial_init(void) | |||
66 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 66 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
67 | req.membase = ioremap(req.mapbase, 0x24); | 67 | req.membase = ioremap(req.mapbase, 0x24); |
68 | #endif | 68 | #endif |
69 | req.irq = irq_create_of_mapping(irq.np, irq.args, irq.args_count); | 69 | req.irq = irq_create_of_mapping(&irq); |
70 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART | 70 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART |
71 | /*HAVE_CTS_LINE*/; | 71 | /*HAVE_CTS_LINE*/; |
72 | req.uartclk = 83300000; | 72 | req.uartclk = 83300000; |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 6e842fdbfcab..d20680446174 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -236,11 +236,8 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) | |||
236 | * tree in case the device-tree is ever fixed | 236 | * tree in case the device-tree is ever fixed |
237 | */ | 237 | */ |
238 | struct of_phandle_args oirq; | 238 | struct of_phandle_args oirq; |
239 | if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) { | 239 | if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) |
240 | virq = irq_create_of_mapping(oirq.np, oirq.args, | 240 | return irq_create_of_mapping(&oirq); |
241 | oirq.args_count); | ||
242 | return virq; | ||
243 | } | ||
244 | 241 | ||
245 | /* Now do the horrible hacks */ | 242 | /* Now do the horrible hacks */ |
246 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); | 243 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); |
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index e9eb4f83b1d5..c3327f3d8cf7 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -190,8 +190,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | |||
190 | ret = -EINVAL; | 190 | ret = -EINVAL; |
191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], | 191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], |
192 | oirq.np->full_name); | 192 | oirq.np->full_name); |
193 | spu->irqs[i] = irq_create_of_mapping(oirq.np, | 193 | spu->irqs[i] = irq_create_of_mapping(&oirq); |
194 | oirq.args, oirq.args_count); | ||
195 | if (spu->irqs[i] == NO_IRQ) { | 194 | if (spu->irqs[i] == NO_IRQ) { |
196 | pr_debug("spu_new: failed to map it !\n"); | 195 | pr_debug("spu_new: failed to map it !\n"); |
197 | goto err; | 196 | goto err; |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index 288226deffa3..8904046556ad 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -334,7 +334,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev) | |||
334 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); | 334 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); |
335 | laddr[1] = laddr[2] = 0; | 335 | laddr[1] = laddr[2] = 0; |
336 | of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq); | 336 | of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq); |
337 | dev->irq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); | 337 | dev->irq = irq_create_of_mapping(&oirq); |
338 | } | 338 | } |
339 | 339 | ||
340 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); | 340 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); |
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c index 6dcf9cc38ffb..18380e8f6dfe 100644 --- a/arch/powerpc/platforms/pseries/event_sources.c +++ b/arch/powerpc/platforms/pseries/event_sources.c | |||
@@ -59,8 +59,7 @@ void request_event_sources_irqs(struct device_node *np, | |||
59 | index++) { | 59 | index++) { |
60 | if (count > 15) | 60 | if (count > 15) |
61 | break; | 61 | break; |
62 | virqs[count] = irq_create_of_mapping(oirq.np, oirq.args, | 62 | virqs[count] = irq_create_of_mapping(&oirq); |
63 | oirq.args_count); | ||
64 | if (virqs[count] == NO_IRQ) { | 63 | if (virqs[count] == NO_IRQ) { |
65 | pr_err("event-sources: Unable to allocate " | 64 | pr_err("event-sources: Unable to allocate " |
66 | "interrupt number for %s\n", | 65 | "interrupt number for %s\n", |