[PATCH 4/4] pata_imx: deny IRQ0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If platform_get_irq() returns IRQ0 (considered invalid according to Linus)
the driver blithely passes it to ata_host_activate() that treats IRQ0 as
a sign that libata should use polling and thus complains about non-NULL 
IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from
the probe() method...

Fixes: e39c75cf3e04 ("ata: Add iMX pata support")
Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>

---
 drivers/ata/pata_imx.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-block/drivers/ata/pata_imx.c
===================================================================
--- linux-block.orig/drivers/ata/pata_imx.c
+++ linux-block/drivers/ata/pata_imx.c
@@ -135,6 +135,8 @@ static int pata_imx_probe(struct platfor
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
+	if (!irq)
+		return -EINVAL;
 
 	priv = devm_kzalloc(&pdev->dev,
 				sizeof(struct pata_imx_priv), GFP_KERNEL);



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux