Commit 34b21434 authored by Russell King's avatar Russell King

[ARM] Use platform_get_resource/platform_get_irq in sa1111.c

parent 26bcc8f7
...@@ -929,16 +929,15 @@ static int sa1111_resume(struct device *dev, u32 level) ...@@ -929,16 +929,15 @@ static int sa1111_resume(struct device *dev, u32 level)
static int sa1111_probe(struct device *dev) static int sa1111_probe(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct resource *mem = NULL, *irq = NULL; struct resource *mem;
int i; int irq;
for (i = 0; i < pdev->num_resources; i++) { mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (pdev->resource[i].flags & IORESOURCE_MEM) if (!mem)
mem = &pdev->resource[i]; return -EINVAL;
if (pdev->resource[i].flags & IORESOURCE_IRQ) irq = platform_get_irq(pdev, 0);
irq = &pdev->resource[i];
} return __sa1111_probe(dev, mem, irq);
return __sa1111_probe(dev, mem, irq ? irq->start : NO_IRQ);
} }
static int sa1111_remove(struct device *dev) static int sa1111_remove(struct device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment