diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-15 11:39:11 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 06:42:51 -0400 |
commit | 530210c7814e83564c7ca7bca8192515042c0b63 (patch) | |
tree | 09549bc731f9397cc6a533e091a47d116d5653b5 /arch | |
parent | 0c02c8007ea5554d028f99fd3e29fc201fdeeab3 (diff) |
of/irq: Replace of_irq with of_phandle_args
struct of_irq and struct of_phandle_args are exactly the same structure.
This patch makes the kernel use of_phandle_args everywhere. This in
itself isn't a big deal, but it makes some follow-on patches simpler.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Tony Lindgren <tony@atomide.com>
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')
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 5 | ||||
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 9 | ||||
-rw-r--r-- | arch/mips/pci/fixup-lantiq.c | 5 | ||||
-rw-r--r-- | arch/mips/pci/pci-rt3883.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_pciex.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_sio.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/fsl_uli1575.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/event_sources.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic_msi.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/devicetree.c | 5 |
14 files changed, 42 insertions, 54 deletions
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 0f496cc51f36..2d6b4da90fb4 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -837,7 +837,7 @@ static struct hw_pci pci_v3 __initdata = { | |||
837 | 837 | ||
838 | static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) | 838 | static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) |
839 | { | 839 | { |
840 | struct of_irq oirq; | 840 | struct of_phandle_args oirq; |
841 | int ret; | 841 | int ret; |
842 | 842 | ||
843 | ret = of_irq_parse_pci(dev, &oirq); | 843 | ret = of_irq_parse_pci(dev, &oirq); |
@@ -847,8 +847,7 @@ static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) | |||
847 | return 0; | 847 | return 0; |
848 | } | 848 | } |
849 | 849 | ||
850 | return irq_create_of_mapping(oirq.controller, oirq.specifier, | 850 | return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
851 | oirq.size); | ||
852 | } | 851 | } |
853 | 852 | ||
854 | static int __init pci_v3_dtprobe(struct platform_device *pdev, | 853 | static int __init pci_v3_dtprobe(struct platform_device *pdev, |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 4d5b1a9cd790..c9302c4f8a57 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -199,7 +199,7 @@ void pcibios_set_master(struct pci_dev *dev) | |||
199 | */ | 199 | */ |
200 | int pci_read_irq_line(struct pci_dev *pci_dev) | 200 | int pci_read_irq_line(struct pci_dev *pci_dev) |
201 | { | 201 | { |
202 | struct of_irq oirq; | 202 | struct of_phandle_args oirq; |
203 | unsigned int virq; | 203 | unsigned int virq; |
204 | 204 | ||
205 | /* The current device-tree that iSeries generates from the HV | 205 | /* The current device-tree that iSeries generates from the HV |
@@ -243,11 +243,10 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
243 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 243 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
244 | } else { | 244 | } else { |
245 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 245 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
246 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 246 | oirq.args_count, oirq.args[0], oirq.args[1], |
247 | of_node_full_name(oirq.controller)); | 247 | of_node_full_name(oirq.np)); |
248 | 248 | ||
249 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 249 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
250 | oirq.size); | ||
251 | } | 250 | } |
252 | if (!virq) { | 251 | if (!virq) { |
253 | pr_debug(" Failed to map !\n"); | 252 | pr_debug(" Failed to map !\n"); |
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c index 2e8dbfedae53..81ff0b5e6efa 100644 --- a/arch/mips/pci/fixup-lantiq.c +++ b/arch/mips/pci/fixup-lantiq.c | |||
@@ -25,7 +25,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
25 | 25 | ||
26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
27 | { | 27 | { |
28 | struct of_irq dev_irq; | 28 | struct of_phandle_args dev_irq; |
29 | int irq; | 29 | int irq; |
30 | 30 | ||
31 | if (of_irq_parse_pci(dev, &dev_irq)) { | 31 | if (of_irq_parse_pci(dev, &dev_irq)) { |
@@ -33,8 +33,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
33 | slot, pin); | 33 | slot, pin); |
34 | return 0; | 34 | return 0; |
35 | } | 35 | } |
36 | irq = irq_create_of_mapping(dev_irq.controller, dev_irq.specifier, | 36 | irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count); |
37 | dev_irq.size); | ||
38 | dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); | 37 | dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); |
39 | return irq; | 38 | return irq; |
40 | } | 39 | } |
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index cae92a05ee70..0f08a5ba0b2a 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c | |||
@@ -583,7 +583,7 @@ err_put_intc_node: | |||
583 | 583 | ||
584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
585 | { | 585 | { |
586 | struct of_irq dev_irq; | 586 | struct of_phandle_args dev_irq; |
587 | int err; | 587 | int err; |
588 | int irq; | 588 | int irq; |
589 | 589 | ||
@@ -594,9 +594,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | irq = irq_create_of_mapping(dev_irq.controller, | 597 | irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count); |
598 | dev_irq.specifier, | ||
599 | dev_irq.size); | ||
600 | 598 | ||
601 | if (irq == 0) | 599 | if (irq == 0) |
602 | pr_crit("pci %s: no irq found for pin %u\n", | 600 | pr_crit("pci %s: no irq found for pin %u\n", |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 2f4185425ed5..96c46235fda2 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -228,7 +228,7 @@ int pcibios_add_platform_entries(struct pci_dev *pdev) | |||
228 | */ | 228 | */ |
229 | static int pci_read_irq_line(struct pci_dev *pci_dev) | 229 | static int pci_read_irq_line(struct pci_dev *pci_dev) |
230 | { | 230 | { |
231 | struct of_irq oirq; | 231 | struct of_phandle_args oirq; |
232 | unsigned int virq; | 232 | unsigned int virq; |
233 | 233 | ||
234 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); | 234 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); |
@@ -263,11 +263,10 @@ static int pci_read_irq_line(struct pci_dev *pci_dev) | |||
263 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 263 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
264 | } else { | 264 | } else { |
265 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 265 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
266 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 266 | oirq.args_count, oirq.args[0], oirq.args[1], |
267 | of_node_full_name(oirq.controller)); | 267 | of_node_full_name(oirq.np)); |
268 | 268 | ||
269 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 269 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
270 | oirq.size); | ||
271 | } | 270 | } |
272 | if(virq == NO_IRQ) { | 271 | if(virq == NO_IRQ) { |
273 | 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 40bc371096b7..e8d34d1f640d 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -486,7 +486,7 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
486 | struct pci_controller *phb) | 486 | struct pci_controller *phb) |
487 | { | 487 | { |
488 | struct resource r; | 488 | struct resource r; |
489 | struct of_irq oirq; | 489 | struct of_phandle_args oirq; |
490 | int virq; | 490 | int virq; |
491 | 491 | ||
492 | /* SMMIO registers; used inside this file */ | 492 | /* SMMIO registers; used inside this file */ |
@@ -511,8 +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.controller, oirq.specifier, | 514 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
515 | oirq.size); | ||
516 | if (request_irq(virq, pciex_handle_internal_irq, | 515 | if (request_irq(virq, pciex_handle_internal_irq, |
517 | 0, "pciex", (void *)phb)) { | 516 | 0, "pciex", (void *)phb)) { |
518 | 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 96388b202f4e..06046d512130 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_sio.c +++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c | |||
@@ -45,7 +45,7 @@ static int __init txx9_serial_init(void) | |||
45 | struct device_node *node; | 45 | struct device_node *node; |
46 | int i; | 46 | int i; |
47 | struct uart_port req; | 47 | struct uart_port req; |
48 | struct of_irq irq; | 48 | struct of_phandle_args irq; |
49 | struct resource res; | 49 | struct resource res; |
50 | 50 | ||
51 | for_each_compatible_node(node, "serial", "toshiba,sio-scc") { | 51 | for_each_compatible_node(node, "serial", "toshiba,sio-scc") { |
@@ -66,8 +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.controller, | 69 | req.irq = irq_create_of_mapping(irq.np, irq.args, irq.args_count); |
70 | irq.specifier, irq.size); | ||
71 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART | 70 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART |
72 | /*HAVE_CTS_LINE*/; | 71 | /*HAVE_CTS_LINE*/; |
73 | 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 b491f406560a..6e842fdbfcab 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -235,10 +235,10 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) | |||
235 | /* First, we check whether we have a real "interrupts" in the device | 235 | /* First, we check whether we have a real "interrupts" in the device |
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_irq 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.controller, oirq.specifier, | 240 | virq = irq_create_of_mapping(oirq.np, oirq.args, |
241 | oirq.size); | 241 | oirq.args_count); |
242 | return virq; | 242 | return virq; |
243 | } | 243 | } |
244 | 244 | ||
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index e6cdb81a0959..e9eb4f83b1d5 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -177,7 +177,7 @@ out: | |||
177 | 177 | ||
178 | static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | 178 | static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) |
179 | { | 179 | { |
180 | struct of_irq oirq; | 180 | struct of_phandle_args oirq; |
181 | int ret; | 181 | int ret; |
182 | int i; | 182 | int i; |
183 | 183 | ||
@@ -188,10 +188,10 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | |||
188 | goto err; | 188 | goto err; |
189 | } | 189 | } |
190 | ret = -EINVAL; | 190 | ret = -EINVAL; |
191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], | 191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], |
192 | oirq.controller->full_name); | 192 | oirq.np->full_name); |
193 | spu->irqs[i] = irq_create_of_mapping(oirq.controller, | 193 | spu->irqs[i] = irq_create_of_mapping(oirq.np, |
194 | oirq.specifier, oirq.size); | 194 | oirq.args, oirq.args_count); |
195 | if (spu->irqs[i] == NO_IRQ) { | 195 | if (spu->irqs[i] == NO_IRQ) { |
196 | pr_debug("spu_new: failed to map it !\n"); | 196 | pr_debug("spu_new: failed to map it !\n"); |
197 | goto err; | 197 | goto err; |
@@ -200,7 +200,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | |||
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | err: | 202 | err: |
203 | pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier, | 203 | pr_debug("failed to map irq %x for spu %s\n", *oirq.args, |
204 | spu->name); | 204 | spu->name); |
205 | for (; i >= 0; i--) { | 205 | for (; i >= 0; i--) { |
206 | if (spu->irqs[i] != NO_IRQ) | 206 | if (spu->irqs[i] != NO_IRQ) |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index ac539c1cd808..288226deffa3 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -321,8 +321,8 @@ static void hpcd_final_uli5288(struct pci_dev *dev) | |||
321 | { | 321 | { |
322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
323 | struct device_node *hosenode = hose ? hose->dn : NULL; | 323 | struct device_node *hosenode = hose ? hose->dn : NULL; |
324 | struct of_irq oirq; | 324 | struct of_phandle_args oirq; |
325 | int virq, pin = 2; | 325 | int pin = 2; |
326 | u32 laddr[3]; | 326 | u32 laddr[3]; |
327 | 327 | ||
328 | if (!machine_is(mpc86xx_hpcd)) | 328 | if (!machine_is(mpc86xx_hpcd)) |
@@ -334,9 +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 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 337 | dev->irq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
338 | oirq.size); | ||
339 | dev->irq = virq; | ||
340 | } | 338 | } |
341 | 339 | ||
342 | 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/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 720663e29f47..4c24bf60d39d 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -394,7 +394,7 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
394 | } | 394 | } |
395 | 395 | ||
396 | int of_irq_parse_oldworld(struct device_node *device, int index, | 396 | int of_irq_parse_oldworld(struct device_node *device, int index, |
397 | struct of_irq *out_irq) | 397 | struct of_phandle_args *out_irq) |
398 | { | 398 | { |
399 | const u32 *ints = NULL; | 399 | const u32 *ints = NULL; |
400 | int intlen; | 400 | int intlen; |
@@ -422,9 +422,9 @@ int of_irq_parse_oldworld(struct device_node *device, int index, | |||
422 | if (index >= intlen) | 422 | if (index >= intlen) |
423 | return -EINVAL; | 423 | return -EINVAL; |
424 | 424 | ||
425 | out_irq->controller = NULL; | 425 | out_irq->np = NULL; |
426 | out_irq->specifier[0] = ints[index]; | 426 | out_irq->args[0] = ints[index]; |
427 | out_irq->size = 1; | 427 | out_irq->args_count = 1; |
428 | 428 | ||
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c index 850c18c457ad..6dcf9cc38ffb 100644 --- a/arch/powerpc/platforms/pseries/event_sources.c +++ b/arch/powerpc/platforms/pseries/event_sources.c | |||
@@ -25,7 +25,7 @@ void request_event_sources_irqs(struct device_node *np, | |||
25 | const char *name) | 25 | const char *name) |
26 | { | 26 | { |
27 | int i, index, count = 0; | 27 | int i, index, count = 0; |
28 | struct of_irq oirq; | 28 | struct of_phandle_args oirq; |
29 | const u32 *opicprop; | 29 | const u32 *opicprop; |
30 | unsigned int opicplen; | 30 | unsigned int opicplen; |
31 | unsigned int virqs[16]; | 31 | unsigned int virqs[16]; |
@@ -59,9 +59,8 @@ 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.controller, | 62 | virqs[count] = irq_create_of_mapping(oirq.np, oirq.args, |
63 | oirq.specifier, | 63 | oirq.args_count); |
64 | oirq.size); | ||
65 | if (virqs[count] == NO_IRQ) { | 64 | if (virqs[count] == NO_IRQ) { |
66 | pr_err("event-sources: Unable to allocate " | 65 | pr_err("event-sources: Unable to allocate " |
67 | "interrupt number for %s\n", | 66 | "interrupt number for %s\n", |
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c index 463e3a7c193c..7dc39f35a4cc 100644 --- a/arch/powerpc/sysdev/mpic_msi.c +++ b/arch/powerpc/sysdev/mpic_msi.c | |||
@@ -35,7 +35,7 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
35 | const struct irq_domain_ops *ops = mpic->irqhost->ops; | 35 | const struct irq_domain_ops *ops = mpic->irqhost->ops; |
36 | struct device_node *np; | 36 | struct device_node *np; |
37 | int flags, index, i; | 37 | int flags, index, i; |
38 | struct of_irq oirq; | 38 | struct of_phandle_args oirq; |
39 | 39 | ||
40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); | 40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); |
41 | 41 | ||
@@ -64,8 +64,8 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
64 | 64 | ||
65 | index = 0; | 65 | index = 0; |
66 | while (of_irq_parse_one(np, index++, &oirq) == 0) { | 66 | while (of_irq_parse_one(np, index++, &oirq) == 0) { |
67 | ops->xlate(mpic->irqhost, NULL, oirq.specifier, | 67 | ops->xlate(mpic->irqhost, NULL, oirq.args, |
68 | oirq.size, &hwirq, &flags); | 68 | oirq.args_count, &hwirq, &flags); |
69 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); | 69 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); |
70 | } | 70 | } |
71 | } | 71 | } |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 3ac6398e5361..00986988a10e 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -105,7 +105,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) | |||
105 | 105 | ||
106 | static int x86_of_pci_irq_enable(struct pci_dev *dev) | 106 | static int x86_of_pci_irq_enable(struct pci_dev *dev) |
107 | { | 107 | { |
108 | struct of_irq oirq; | 108 | struct of_phandle_args oirq; |
109 | u32 virq; | 109 | u32 virq; |
110 | int ret; | 110 | int ret; |
111 | u8 pin; | 111 | u8 pin; |
@@ -120,8 +120,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev) | |||
120 | if (ret) | 120 | if (ret) |
121 | return ret; | 121 | return ret; |
122 | 122 | ||
123 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 123 | virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); |
124 | oirq.size); | ||
125 | if (virq == 0) | 124 | if (virq == 0) |
126 | return -EINVAL; | 125 | return -EINVAL; |
127 | dev->irq = virq; | 126 | dev->irq = virq; |