aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uio
diff options
context:
space:
mode:
authorBenedikt Spranger <b.spranger@linutronix.de>2012-05-14 12:48:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-15 11:44:58 -0400
commit94ca629e40eb7e997be21d8065c25e4f3797b03f (patch)
tree4d6360473045502c736cd28c39ce2399e06f6f84 /drivers/uio
parent7458eab6f4527bce719703eb15fef1cff9e8d9e0 (diff)
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: 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>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_pdrv_genirq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index b98371d93a92..42202cd83158 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -146,6 +146,14 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
146 priv->flags = 0; /* interrupt is enabled to begin with */ 146 priv->flags = 0; /* interrupt is enabled to begin with */
147 priv->pdev = pdev; 147 priv->pdev = pdev;
148 148
149 if (!uioinfo->irq) {
150 ret = platform_get_irq(pdev, 0);
151 if (ret < 0) {
152 dev_err(&pdev->dev, "failed to get IRQ\n");
153 goto bad0;
154 }
155 uioinfo->irq = ret;
156 }
149 uiomem = &uioinfo->mem[0]; 157 uiomem = &uioinfo->mem[0];
150 158
151 for (i = 0; i < pdev->num_resources; ++i) { 159 for (i = 0; i < pdev->num_resources; ++i) {