diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2013-09-18 09:24:44 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 06:50:35 -0400 |
commit | f7578496a671a96e501f16a5104893275e32c33a (patch) | |
tree | f1bc2db4847acdea2bb4c777782b29c35c084ae2 | |
parent | 3da5278727a895d49a601f67fd49dffa0b80f9a5 (diff) |
of/irq: Use irq_of_parse_and_map()
Replace some instances of of_irq_map_one()/irq_create_of_mapping() and
of_irq_to_resource() by the simpler equivalent irq_of_parse_and_map().
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
[grant.likely: resolved conflicts with core code renames]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
-rw-r--r-- | arch/arm/mach-u300/timer.c | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_pciex.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_gtm.c | 9 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic_msgr.c | 6 | ||||
-rw-r--r-- | drivers/crypto/caam/ctrl.c | 2 | ||||
-rw-r--r-- | drivers/crypto/caam/jr.c | 2 | ||||
-rw-r--r-- | drivers/crypto/omap-sham.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-cpm.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/arc/emac_main.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 6 | ||||
-rw-r--r-- | drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 |
16 files changed, 35 insertions, 39 deletions
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index b5db207dfd1e..9a5f9fb352ce 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -358,8 +358,7 @@ static struct delay_timer u300_delay_timer; | |||
358 | */ | 358 | */ |
359 | static void __init u300_timer_init_of(struct device_node *np) | 359 | static void __init u300_timer_init_of(struct device_node *np) |
360 | { | 360 | { |
361 | struct resource irq_res; | 361 | unsigned int irq; |
362 | int irq; | ||
363 | struct clk *clk; | 362 | struct clk *clk; |
364 | unsigned long rate; | 363 | unsigned long rate; |
365 | 364 | ||
@@ -368,11 +367,11 @@ static void __init u300_timer_init_of(struct device_node *np) | |||
368 | panic("could not ioremap system timer\n"); | 367 | panic("could not ioremap system timer\n"); |
369 | 368 | ||
370 | /* Get the IRQ for the GP1 timer */ | 369 | /* Get the IRQ for the GP1 timer */ |
371 | irq = of_irq_to_resource(np, 2, &irq_res); | 370 | irq = irq_of_parse_and_map(np, 2); |
372 | if (irq <= 0) | 371 | if (!irq) |
373 | panic("no IRQ for system timer\n"); | 372 | panic("no IRQ for system timer\n"); |
374 | 373 | ||
375 | pr_info("U300 GP1 timer @ base: %p, IRQ: %d\n", u300_timer_base, irq); | 374 | pr_info("U300 GP1 timer @ base: %p, IRQ: %u\n", u300_timer_base, irq); |
376 | 375 | ||
377 | /* Clock the interrupt controller */ | 376 | /* Clock the interrupt controller */ |
378 | clk = of_clk_get(np, 0); | 377 | clk = of_clk_get(np, 0); |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index b3ea96db5b06..4278acfa2ede 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -486,7 +486,6 @@ 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_phandle_args oirq; | ||
490 | int virq; | 489 | int virq; |
491 | 490 | ||
492 | /* SMMIO registers; used inside this file */ | 491 | /* SMMIO registers; used inside this file */ |
@@ -507,11 +506,11 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
507 | phb->ops = &scc_pciex_pci_ops; | 506 | phb->ops = &scc_pciex_pci_ops; |
508 | 507 | ||
509 | /* internal interrupt handler */ | 508 | /* internal interrupt handler */ |
510 | if (of_irq_parse_one(node, 1, &oirq)) { | 509 | virq = irq_of_parse_and_map(node, 1); |
510 | if (!virq) { | ||
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); | ||
515 | if (request_irq(virq, pciex_handle_internal_irq, | 514 | if (request_irq(virq, pciex_handle_internal_irq, |
516 | 0, "pciex", (void *)phb)) { | 515 | 0, "pciex", (void *)phb)) { |
517 | pr_err("PCIEXC:Failed to request irq\n"); | 516 | pr_err("PCIEXC:Failed to request irq\n"); |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index d20680446174..1f72f4ab6353 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -235,9 +235,9 @@ 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_phandle_args oirq; | 238 | virq = irq_of_parse_and_map(pic->host->of_node, 0); |
239 | if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) | 239 | if (virq) |
240 | return irq_create_of_mapping(&oirq); | 240 | return virq; |
241 | 241 | ||
242 | /* Now do the horrible hacks */ | 242 | /* Now do the horrible hacks */ |
243 | 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/sysdev/fsl_gtm.c b/arch/powerpc/sysdev/fsl_gtm.c index 0eb871cc3437..dd0d5be6cd1f 100644 --- a/arch/powerpc/sysdev/fsl_gtm.c +++ b/arch/powerpc/sysdev/fsl_gtm.c | |||
@@ -401,16 +401,15 @@ static int __init fsl_gtm_init(void) | |||
401 | gtm->clock = *clock; | 401 | gtm->clock = *clock; |
402 | 402 | ||
403 | for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) { | 403 | for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) { |
404 | int ret; | 404 | unsigned int irq; |
405 | struct resource irq; | ||
406 | 405 | ||
407 | ret = of_irq_to_resource(np, i, &irq); | 406 | irq = irq_of_parse_and_map(np, i); |
408 | if (ret == NO_IRQ) { | 407 | if (irq == NO_IRQ) { |
409 | pr_err("%s: not enough interrupts specified\n", | 408 | pr_err("%s: not enough interrupts specified\n", |
410 | np->full_name); | 409 | np->full_name); |
411 | goto err; | 410 | goto err; |
412 | } | 411 | } |
413 | gtm->timers[i].irq = irq.start; | 412 | gtm->timers[i].irq = irq; |
414 | gtm->timers[i].gtm = gtm; | 413 | gtm->timers[i].gtm = gtm; |
415 | } | 414 | } |
416 | 415 | ||
diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c index c75325865a85..2c9b52aa266c 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c | |||
@@ -237,15 +237,13 @@ static int mpic_msgr_probe(struct platform_device *dev) | |||
237 | raw_spin_lock_init(&msgr->lock); | 237 | raw_spin_lock_init(&msgr->lock); |
238 | 238 | ||
239 | if (receive_mask & (1 << i)) { | 239 | if (receive_mask & (1 << i)) { |
240 | struct resource irq; | 240 | msgr->irq = irq_of_parse_and_map(np, irq_index); |
241 | 241 | if (msgr->irq == NO_IRQ) { | |
242 | if (of_irq_to_resource(np, irq_index, &irq) == NO_IRQ) { | ||
243 | dev_err(&dev->dev, | 242 | dev_err(&dev->dev, |
244 | "Missing interrupt specifier"); | 243 | "Missing interrupt specifier"); |
245 | kfree(msgr); | 244 | kfree(msgr); |
246 | return -EFAULT; | 245 | return -EFAULT; |
247 | } | 246 | } |
248 | msgr->irq = irq.start; | ||
249 | irq_index += 1; | 247 | irq_index += 1; |
250 | } else { | 248 | } else { |
251 | msgr->irq = NO_IRQ; | 249 | msgr->irq = NO_IRQ; |
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index b010d42a1803..ae6e5542ec46 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
@@ -224,7 +224,7 @@ static int caam_probe(struct platform_device *pdev) | |||
224 | topregs = (struct caam_full __iomem *)ctrl; | 224 | topregs = (struct caam_full __iomem *)ctrl; |
225 | 225 | ||
226 | /* Get the IRQ of the controller (for security violations only) */ | 226 | /* Get the IRQ of the controller (for security violations only) */ |
227 | ctrlpriv->secvio_irq = of_irq_to_resource(nprop, 0, NULL); | 227 | ctrlpriv->secvio_irq = irq_of_parse_and_map(nprop, 0); |
228 | 228 | ||
229 | /* | 229 | /* |
230 | * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, | 230 | * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, |
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 105ba4da6180..517a16d87e4b 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c | |||
@@ -403,7 +403,7 @@ int caam_jr_probe(struct platform_device *pdev, struct device_node *np, | |||
403 | dma_set_mask(jrdev, DMA_BIT_MASK(32)); | 403 | dma_set_mask(jrdev, DMA_BIT_MASK(32)); |
404 | 404 | ||
405 | /* Identify the interrupt */ | 405 | /* Identify the interrupt */ |
406 | jrpriv->irq = of_irq_to_resource(np, 0, NULL); | 406 | jrpriv->irq = irq_of_parse_and_map(np, 0); |
407 | 407 | ||
408 | /* Now do the platform independent part */ | 408 | /* Now do the platform independent part */ |
409 | error = caam_jr_init(jrdev); /* now turn on hardware */ | 409 | error = caam_jr_init(jrdev); /* now turn on hardware */ |
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 8bdde57f6bb1..e28104b4aab0 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c | |||
@@ -1818,7 +1818,7 @@ static int omap_sham_get_res_of(struct omap_sham_dev *dd, | |||
1818 | goto err; | 1818 | goto err; |
1819 | } | 1819 | } |
1820 | 1820 | ||
1821 | dd->irq = of_irq_to_resource(node, 0, NULL); | 1821 | dd->irq = irq_of_parse_and_map(node, 0); |
1822 | if (!dd->irq) { | 1822 | if (!dd->irq) { |
1823 | dev_err(dev, "can't translate OF irq value\n"); | 1823 | dev_err(dev, "can't translate OF irq value\n"); |
1824 | err = -EINVAL; | 1824 | err = -EINVAL; |
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index b2b8aa9adc0e..3e5ea2c87a6e 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
@@ -447,7 +447,7 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm) | |||
447 | 447 | ||
448 | init_waitqueue_head(&cpm->i2c_wait); | 448 | init_waitqueue_head(&cpm->i2c_wait); |
449 | 449 | ||
450 | cpm->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); | 450 | cpm->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
451 | if (!cpm->irq) | 451 | if (!cpm->irq) |
452 | return -EINVAL; | 452 | return -EINVAL; |
453 | 453 | ||
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 4b7662a17ae9..36f7b9533397 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -235,12 +235,12 @@ static void sxps2_close(struct serio *pserio) | |||
235 | */ | 235 | */ |
236 | static int xps2_of_probe(struct platform_device *ofdev) | 236 | static int xps2_of_probe(struct platform_device *ofdev) |
237 | { | 237 | { |
238 | struct resource r_irq; /* Interrupt resources */ | ||
239 | struct resource r_mem; /* IO mem resources */ | 238 | struct resource r_mem; /* IO mem resources */ |
240 | struct xps2data *drvdata; | 239 | struct xps2data *drvdata; |
241 | struct serio *serio; | 240 | struct serio *serio; |
242 | struct device *dev = &ofdev->dev; | 241 | struct device *dev = &ofdev->dev; |
243 | resource_size_t remap_size, phys_addr; | 242 | resource_size_t remap_size, phys_addr; |
243 | unsigned int irq; | ||
244 | int error; | 244 | int error; |
245 | 245 | ||
246 | dev_info(dev, "Device Tree Probing \'%s\'\n", | 246 | dev_info(dev, "Device Tree Probing \'%s\'\n", |
@@ -254,7 +254,8 @@ static int xps2_of_probe(struct platform_device *ofdev) | |||
254 | } | 254 | } |
255 | 255 | ||
256 | /* Get IRQ for the device */ | 256 | /* Get IRQ for the device */ |
257 | if (!of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq)) { | 257 | irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
258 | if (!irq) { | ||
258 | dev_err(dev, "no IRQ found\n"); | 259 | dev_err(dev, "no IRQ found\n"); |
259 | return -ENODEV; | 260 | return -ENODEV; |
260 | } | 261 | } |
@@ -267,7 +268,7 @@ static int xps2_of_probe(struct platform_device *ofdev) | |||
267 | } | 268 | } |
268 | 269 | ||
269 | spin_lock_init(&drvdata->lock); | 270 | spin_lock_init(&drvdata->lock); |
270 | drvdata->irq = r_irq.start; | 271 | drvdata->irq = irq; |
271 | drvdata->serio = serio; | 272 | drvdata->serio = serio; |
272 | drvdata->dev = dev; | 273 | drvdata->dev = dev; |
273 | 274 | ||
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index 9e1601487263..d0878526c0c8 100644 --- a/drivers/net/ethernet/arc/emac_main.c +++ b/drivers/net/ethernet/arc/emac_main.c | |||
@@ -628,12 +628,12 @@ static const struct net_device_ops arc_emac_netdev_ops = { | |||
628 | 628 | ||
629 | static int arc_emac_probe(struct platform_device *pdev) | 629 | static int arc_emac_probe(struct platform_device *pdev) |
630 | { | 630 | { |
631 | struct resource res_regs, res_irq; | 631 | struct resource res_regs; |
632 | struct device_node *phy_node; | 632 | struct device_node *phy_node; |
633 | struct arc_emac_priv *priv; | 633 | struct arc_emac_priv *priv; |
634 | struct net_device *ndev; | 634 | struct net_device *ndev; |
635 | const char *mac_addr; | 635 | const char *mac_addr; |
636 | unsigned int id, clock_frequency; | 636 | unsigned int id, clock_frequency, irq; |
637 | int err; | 637 | int err; |
638 | 638 | ||
639 | if (!pdev->dev.of_node) | 639 | if (!pdev->dev.of_node) |
@@ -661,8 +661,8 @@ static int arc_emac_probe(struct platform_device *pdev) | |||
661 | } | 661 | } |
662 | 662 | ||
663 | /* Get IRQ from device tree */ | 663 | /* Get IRQ from device tree */ |
664 | err = of_irq_to_resource(pdev->dev.of_node, 0, &res_irq); | 664 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); |
665 | if (!err) { | 665 | if (!irq) { |
666 | dev_err(&pdev->dev, "failed to retrieve <irq> value from device tree\n"); | 666 | dev_err(&pdev->dev, "failed to retrieve <irq> value from device tree\n"); |
667 | return -ENODEV; | 667 | return -ENODEV; |
668 | } | 668 | } |
@@ -711,7 +711,7 @@ static int arc_emac_probe(struct platform_device *pdev) | |||
711 | goto out; | 711 | goto out; |
712 | } | 712 | } |
713 | 713 | ||
714 | ndev->irq = res_irq.start; | 714 | ndev->irq = irq; |
715 | dev_info(&pdev->dev, "IRQ is %d\n", ndev->irq); | 715 | dev_info(&pdev->dev, "IRQ is %d\n", ndev->irq); |
716 | 716 | ||
717 | /* Register interrupt handler for device */ | 717 | /* Register interrupt handler for device */ |
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c b/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c index 7583a9572bcc..10f781d8cb09 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | |||
@@ -88,7 +88,7 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
88 | struct fs_platform_info *fpi = fep->fpi; | 88 | struct fs_platform_info *fpi = fep->fpi; |
89 | int ret = -EINVAL; | 89 | int ret = -EINVAL; |
90 | 90 | ||
91 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); | 91 | fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
92 | if (fep->interrupt == NO_IRQ) | 92 | if (fep->interrupt == NO_IRQ) |
93 | goto out; | 93 | goto out; |
94 | 94 | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index 9ae6cdbcac2e..53a0c23b4890 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c | |||
@@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct platform_device *ofdev = to_platform_device(fep->dev); | 99 | struct platform_device *ofdev = to_platform_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); | 101 | fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c index 22a02a767069..631f09872fa2 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c | |||
@@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct platform_device *ofdev = to_platform_device(fep->dev); | 99 | struct platform_device *ofdev = to_platform_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); | 101 | fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index b8f1103fe28e..3197d55f30cd 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
@@ -687,7 +687,7 @@ static int of_fsl_espi_probe(struct platform_device *ofdev) | |||
687 | struct device_node *np = ofdev->dev.of_node; | 687 | struct device_node *np = ofdev->dev.of_node; |
688 | struct spi_master *master; | 688 | struct spi_master *master; |
689 | struct resource mem; | 689 | struct resource mem; |
690 | struct resource irq; | 690 | unsigned int irq; |
691 | int ret = -ENOMEM; | 691 | int ret = -ENOMEM; |
692 | 692 | ||
693 | ret = of_mpc8xxx_spi_probe(ofdev); | 693 | ret = of_mpc8xxx_spi_probe(ofdev); |
@@ -702,13 +702,13 @@ static int of_fsl_espi_probe(struct platform_device *ofdev) | |||
702 | if (ret) | 702 | if (ret) |
703 | goto err; | 703 | goto err; |
704 | 704 | ||
705 | ret = of_irq_to_resource(np, 0, &irq); | 705 | irq = irq_of_parse_and_map(np, 0); |
706 | if (!ret) { | 706 | if (!ret) { |
707 | ret = -EINVAL; | 707 | ret = -EINVAL; |
708 | goto err; | 708 | goto err; |
709 | } | 709 | } |
710 | 710 | ||
711 | master = fsl_espi_probe(dev, &mem, irq.start); | 711 | master = fsl_espi_probe(dev, &mem, irq); |
712 | if (IS_ERR(master)) { | 712 | if (IS_ERR(master)) { |
713 | ret = PTR_ERR(master); | 713 | ret = PTR_ERR(master); |
714 | goto err; | 714 | goto err; |
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c index 1a535f70dc41..6957f445a114 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1207,7 +1207,7 @@ static int cpm_uart_init_port(struct device_node *np, | |||
1207 | pinfo->port.fifosize = pinfo->tx_nrfifos * pinfo->tx_fifosize; | 1207 | pinfo->port.fifosize = pinfo->tx_nrfifos * pinfo->tx_fifosize; |
1208 | spin_lock_init(&pinfo->port.lock); | 1208 | spin_lock_init(&pinfo->port.lock); |
1209 | 1209 | ||
1210 | pinfo->port.irq = of_irq_to_resource(np, 0, NULL); | 1210 | pinfo->port.irq = irq_of_parse_and_map(np, 0); |
1211 | if (pinfo->port.irq == NO_IRQ) { | 1211 | if (pinfo->port.irq == NO_IRQ) { |
1212 | ret = -EINVAL; | 1212 | ret = -EINVAL; |
1213 | goto out_pram; | 1213 | goto out_pram; |