diff options
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 25 | ||||
-rw-r--r-- | kernel/irq/handle.c | 2 | ||||
-rw-r--r-- | kernel/irq/resend.c | 2 |
3 files changed, 21 insertions, 8 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c8648a83b80a..a95b47831269 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -287,9 +287,9 @@ EXPORT_SYMBOL_GPL(set_irq_nested_thread); | |||
287 | /* | 287 | /* |
288 | * default enable function | 288 | * default enable function |
289 | */ | 289 | */ |
290 | static void default_enable(unsigned int irq) | 290 | static void default_enable(struct irq_data *data) |
291 | { | 291 | { |
292 | struct irq_desc *desc = irq_to_desc(irq); | 292 | struct irq_desc *desc = irq_data_to_desc(data); |
293 | 293 | ||
294 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 294 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
295 | desc->status &= ~IRQ_MASKED; | 295 | desc->status &= ~IRQ_MASKED; |
@@ -309,7 +309,7 @@ static unsigned int default_startup(unsigned int irq) | |||
309 | { | 309 | { |
310 | struct irq_desc *desc = irq_to_desc(irq); | 310 | struct irq_desc *desc = irq_to_desc(irq); |
311 | 311 | ||
312 | desc->irq_data.chip->enable(irq); | 312 | desc->irq_data.chip->irq_enable(&desc->irq_data); |
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
@@ -350,6 +350,11 @@ static void compat_irq_eoi(struct irq_data *data) | |||
350 | data->chip->eoi(data->irq); | 350 | data->chip->eoi(data->irq); |
351 | } | 351 | } |
352 | 352 | ||
353 | static void compat_irq_enable(struct irq_data *data) | ||
354 | { | ||
355 | data->chip->enable(data->irq); | ||
356 | } | ||
357 | |||
353 | static void compat_bus_lock(struct irq_data *data) | 358 | static void compat_bus_lock(struct irq_data *data) |
354 | { | 359 | { |
355 | data->chip->bus_lock(data->irq); | 360 | data->chip->bus_lock(data->irq); |
@@ -365,8 +370,18 @@ static void compat_bus_sync_unlock(struct irq_data *data) | |||
365 | */ | 370 | */ |
366 | void irq_chip_set_defaults(struct irq_chip *chip) | 371 | void irq_chip_set_defaults(struct irq_chip *chip) |
367 | { | 372 | { |
368 | if (!chip->enable) | 373 | /* |
369 | chip->enable = default_enable; | 374 | * Compat fixup functions need to be before we set the |
375 | * defaults for enable/disable/startup/shutdown | ||
376 | */ | ||
377 | if (chip->enable) | ||
378 | chip->irq_enable = compat_irq_enable; | ||
379 | |||
380 | /* | ||
381 | * The real defaults | ||
382 | */ | ||
383 | if (!chip->irq_enable) | ||
384 | chip->irq_enable = default_enable; | ||
370 | if (!chip->disable) | 385 | if (!chip->disable) |
371 | chip->disable = default_disable; | 386 | chip->disable = default_disable; |
372 | if (!chip->startup) | 387 | if (!chip->startup) |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 9ba7aece0e4d..ac8c749dfee5 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -328,7 +328,6 @@ struct irq_chip no_irq_chip = { | |||
328 | .irq_ack = ack_bad, | 328 | .irq_ack = ack_bad, |
329 | .startup = compat_noop_ret, | 329 | .startup = compat_noop_ret, |
330 | .shutdown = compat_noop, | 330 | .shutdown = compat_noop, |
331 | .enable = compat_noop, | ||
332 | .disable = compat_noop, | 331 | .disable = compat_noop, |
333 | .end = compat_noop, | 332 | .end = compat_noop, |
334 | }; | 333 | }; |
@@ -348,7 +347,6 @@ struct irq_chip dummy_irq_chip = { | |||
348 | .irq_unmask = noop, | 347 | .irq_unmask = noop, |
349 | .startup = compat_noop_ret, | 348 | .startup = compat_noop_ret, |
350 | .shutdown = compat_noop, | 349 | .shutdown = compat_noop, |
351 | .enable = compat_noop, | ||
352 | .disable = compat_noop, | 350 | .disable = compat_noop, |
353 | .end = compat_noop, | 351 | .end = compat_noop, |
354 | }; | 352 | }; |
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 47c56a097928..a798a2328f8a 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c | |||
@@ -60,7 +60,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq) | |||
60 | /* | 60 | /* |
61 | * Make sure the interrupt is enabled, before resending it: | 61 | * Make sure the interrupt is enabled, before resending it: |
62 | */ | 62 | */ |
63 | desc->irq_data.chip->enable(irq); | 63 | desc->irq_data.chip->irq_enable(&desc->irq_data); |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * We do not resend level type interrupts. Level type | 66 | * We do not resend level type interrupts. Level type |