[patch 2.6.26-git] genirq: better warning on irqchip->set_type() failure

From: David Brownell
Date: Thu Jul 24 2008 - 20:50:38 EST


From: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

While I'm glad to finally see the hole fixed whereby passing an
invalid IRQ trigger type to request_irq() would be ignored, the
current diagnostic isn't quite useful. Fixed by also listing
the trigger type which was rejected.

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -326,8 +326,8 @@ static int __irq_set_trigger(struct irq_chip *chip, unsigned int irq,
ret = chip->set_type(irq, flags & IRQF_TRIGGER_MASK);

if (ret)
- pr_err("setting flow type for irq %u failed (%pF)\n",
- irq, chip->set_type);
+ pr_err("setting trigger type %d for irq %u failed (%pF)\n",
+ flags & IRQF_TRIGGER_MASK, irq, chip->set_type);

return ret;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/