|
@@ -120,13 +120,9 @@ static int cplds_probe(struct platform_device *pdev)
|
|
|
if (!fpga)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
|
|
- if (res) {
|
|
|
- fpga->irq = (unsigned int)res->start;
|
|
|
- irqflags = res->flags;
|
|
|
- }
|
|
|
- if (!fpga->irq)
|
|
|
- return -ENODEV;
|
|
|
+ fpga->irq = platform_get_irq(pdev, 0);
|
|
|
+ if (fpga->irq <= 0)
|
|
|
+ return fpga->irq;
|
|
|
|
|
|
base_irq = platform_get_irq(pdev, 1);
|
|
|
if (base_irq < 0)
|
|
@@ -142,6 +138,7 @@ static int cplds_probe(struct platform_device *pdev)
|
|
|
writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN);
|
|
|
writel(0, fpga->base + FPGA_IRQ_SET_CLR);
|
|
|
|
|
|
+ irqflags = irq_get_trigger_type(fpga->irq);
|
|
|
ret = devm_request_irq(&pdev->dev, fpga->irq, cplds_irq_handler,
|
|
|
irqflags, dev_name(&pdev->dev), fpga);
|
|
|
if (ret == -ENOSYS)
|