/*
* default enable function
*/
-static void default_enable(unsigned int irq)
+static void default_enable(struct irq_data *data)
{
- struct irq_desc *desc = irq_to_desc(irq);
+ struct irq_desc *desc = irq_data_to_desc(data);
desc->irq_data.chip->irq_unmask(&desc->irq_data);
desc->status &= ~IRQ_MASKED;
{
struct irq_desc *desc = irq_to_desc(irq);
- desc->irq_data.chip->enable(irq);
+ desc->irq_data.chip->irq_enable(&desc->irq_data);
return 0;
}
data->chip->eoi(data->irq);
}
+static void compat_irq_enable(struct irq_data *data)
+{
+ data->chip->enable(data->irq);
+}
+
static void compat_bus_lock(struct irq_data *data)
{
data->chip->bus_lock(data->irq);
*/
void irq_chip_set_defaults(struct irq_chip *chip)
{
- if (!chip->enable)
- chip->enable = default_enable;
+ /*
+ * Compat fixup functions need to be before we set the
+ * defaults for enable/disable/startup/shutdown
+ */
+ if (chip->enable)
+ chip->irq_enable = compat_irq_enable;
+
+ /*
+ * The real defaults
+ */
+ if (!chip->irq_enable)
+ chip->irq_enable = default_enable;
if (!chip->disable)
chip->disable = default_disable;
if (!chip->startup)
/*
* Make sure the interrupt is enabled, before resending it:
*/
- desc->irq_data.chip->enable(irq);
+ desc->irq_data.chip->irq_enable(&desc->irq_data);
/*
* We do not resend level type interrupts. Level type