Commit 94ca629e authored by Benedikt Spranger's avatar Benedikt Spranger Committed by Greg Kroah-Hartman

uio_pdrv_genirq: get irq through platform resource if not set otherwise

Platform devices are configured through platform resources. The interrupt
in the driver uio_pdrv_genirq is instead configured through a side channel
i.e. the platform data structure. Make it possible to use the generic
configuration scheme via platform resource.
Signed-off-by: default avatarBenedikt Spranger <b.spranger@linutronix.de>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatar"Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7458eab6
......@@ -146,6 +146,14 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
priv->flags = 0; /* interrupt is enabled to begin with */
priv->pdev = pdev;
if (!uioinfo->irq) {
ret = platform_get_irq(pdev, 0);
if (ret < 0) {
dev_err(&pdev->dev, "failed to get IRQ\n");
goto bad0;
}
uioinfo->irq = ret;
}
uiomem = &uioinfo->mem[0];
for (i = 0; i < pdev->num_resources; ++i) {
......
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