Skip to content

Commit

Permalink
uio_pdrv_genirq: get irq through platform resource if not set otherwise
Browse files Browse the repository at this point in the history
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: Benedikt Spranger <b.spranger@linutronix.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Benedikt Spranger authored and Greg Kroah-Hartman committed May 15, 2012
1 parent 7458eab commit 94ca629
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/uio/uio_pdrv_genirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 94ca629

Please sign in to comment.