mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-03 10:33:11 +02:00
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:
parent
0bf9c6f84f
commit
35bbc34e99
|
@ -522,6 +522,10 @@ static int caam_jr_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* Identify the interrupt */
|
/* Identify the interrupt */
|
||||||
jrpriv->irq = irq_of_parse_and_map(nprop, 0);
|
jrpriv->irq = irq_of_parse_and_map(nprop, 0);
|
||||||
|
if (jrpriv->irq <= 0) {
|
||||||
|
kfree(jrpriv);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Now do the platform independent part */
|
/* Now do the platform independent part */
|
||||||
error = caam_jr_init(jrdev); /* now turn on hardware */
|
error = caam_jr_init(jrdev); /* now turn on hardware */
|
||||||
|
|
|
@ -214,7 +214,11 @@ static int snvs_secvio_probe(struct platform_device *pdev)
|
||||||
kfree(svpriv);
|
kfree(svpriv);
|
||||||
return -EINVAL;
|
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);
|
snvsregs = of_iomap(np, 0);
|
||||||
if (!snvsregs) {
|
if (!snvsregs) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user