MLK-9769-23 Replace SECVIO of_irq_to_resource() with irq_of_parse_and_map()

Replace of_irq_to_resource() in the SECVIO module with the simpler
equivalent irq_of_parse_and_map().  Also, add error checking to
to the SECVIO and Job Ring modules. Based on upstream commit
f7578496a6.

Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
This commit is contained in:
Victoria Milhoan 2015-01-14 11:43:12 -07:00 committed by Leonard Crestez
parent 0bf9c6f84f
commit 35bbc34e99
2 changed files with 9 additions and 1 deletions

View File

@ -522,6 +522,10 @@ static int caam_jr_probe(struct platform_device *pdev)
/* Identify the interrupt */
jrpriv->irq = irq_of_parse_and_map(nprop, 0);
if (jrpriv->irq <= 0) {
kfree(jrpriv);
return -EINVAL;
}
/* Now do the platform independent part */
error = caam_jr_init(jrdev); /* now turn on hardware */

View File

@ -214,7 +214,11 @@ static int snvs_secvio_probe(struct platform_device *pdev)
kfree(svpriv);
return -EINVAL;
}
svpriv->irq = of_irq_to_resource(npirq, 0, NULL);
svpriv->irq = irq_of_parse_and_map(npirq, 0);
if (svpriv->irq <= 0) {
kfree(svpriv);
return -EINVAL;
}
snvsregs = of_iomap(np, 0);
if (!snvsregs) {