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.
Unified · Split
| @@ -146,6 +146,14 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) · 145 unmodified lines | |||
| 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) { |