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 <[email protected]>
Acked-by: Rob Herring <[email protected]>
[grant.likely: resolved conflicts with core code renames]
Signed-off-by: Grant Likely <[email protected]>
This commit is contained in:
Thierry Reding 2013-09-18 15:24:44 +02:00 • committed by Grant Likely
commit f7578496a6
16 changed files with 35 additions and 39 deletions

View file

@ -235,12 +235,12 @@ static void sxps2_close(struct serio *pserio)
*/
static int xps2_of_probe(struct platform_device *ofdev)
{
struct resource r_irq; /* Interrupt resources */
struct resource r_mem; /* IO mem resources */
struct xps2data *drvdata;
struct serio *serio;
struct device *dev = &ofdev->dev;
resource_size_t remap_size, phys_addr;
unsigned int irq;
int error;
dev_info(dev, "Device Tree Probing \'%s\'\n",
@ -254,7 +254,8 @@ static int xps2_of_probe(struct platform_device *ofdev)
}
/* Get IRQ for the device */
if (!of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq)) {
irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
if (!irq) {
dev_err(dev, "no IRQ found\n");
return -ENODEV;
}
@ -267,7 +268,7 @@ static int xps2_of_probe(struct platform_device *ofdev)
}
spin_lock_init(&drvdata->lock);
drvdata->irq = r_irq.start;
drvdata->irq = irq;
drvdata->serio = serio;
drvdata->dev = dev;