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>
This commit is contained in:
Thierry Reding 2013-09-18 15:24:44 +02:00 committed by Grant Likely
parent 3da5278727
commit f7578496a6
16 changed files with 35 additions and 39 deletions

View file

@ -628,12 +628,12 @@ static const struct net_device_ops arc_emac_netdev_ops = {
static int arc_emac_probe(struct platform_device *pdev)
{
struct resource res_regs, res_irq;
struct resource res_regs;
struct device_node *phy_node;
struct arc_emac_priv *priv;
struct net_device *ndev;
const char *mac_addr;
unsigned int id, clock_frequency;
unsigned int id, clock_frequency, irq;
int err;
if (!pdev->dev.of_node)
@ -661,8 +661,8 @@ static int arc_emac_probe(struct platform_device *pdev)
}
/* Get IRQ from device tree */
err = of_irq_to_resource(pdev->dev.of_node, 0, &res_irq);
if (!err) {
irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (!irq) {
dev_err(&pdev->dev, "failed to retrieve <irq> value from device tree\n");
return -ENODEV;
}
@ -711,7 +711,7 @@ static int arc_emac_probe(struct platform_device *pdev)
goto out;
}
ndev->irq = res_irq.start;
ndev->irq = irq;
dev_info(&pdev->dev, "IRQ is %d\n", ndev->irq);
/* Register interrupt handler for device */