Skip to contentSkip to conversation

PATCH: require dev_id for shared irq

PATCH Bradley D. LaRonde 1 participant 1 message Oct 28, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

2001-10-28 Bradley D. LaRonde <[email protected]>

- Require a dev_id for shared interrupts.

mips/kernel/irq.c +4 -10
@@ -350,18 +350,12 @@
 	int retval;
 	struct irqaction * action;
 
-#if 1
 	/*
-	 * Sanity-check: shared interrupts should REALLY pass in
-	 * a real dev-ID, otherwise we'll have trouble later trying
-	 * to figure out which interrupt is which (messes up the
-	 * interrupt freeing logic etc).
+	 * Shared interrupts require a dev_id, otherwise we can't
+	 * later figure out which interrupt to free.
 	 */
-	if (irqflags & SA_SHIRQ) {
-		if (!dev_id)
-			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
-	}
-#endif
+	if ((irqflags & SA_SHIRQ) && !dev_id)
+		return -EINVAL;
 
 	if (irq >= NR_IRQS)
 		return -EINVAL;