diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-27 08:44:44 -0400 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-04 06:43:37 -0400 | 
| commit | 0eda58b7f3a30c9a13d83db1cfaab00e1c452055 (patch) | |
| tree | 6e6efb689188f20271d8dd290008652d3c3defd8 /kernel/irq/chip.c | |
| parent | e2c0f8ff0fc26959952fbfa89f732fef928df77f (diff) | |
genirq: Provide compat handling for chip->unmask()
Wrap the old chip function unmask() until the migration is complete
and the old chip functions are removed.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.043608928@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/chip.c')
| -rw-r--r-- | kernel/irq/chip.c | 20 | 
1 files changed, 14 insertions, 6 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index c041270bfe50..dbdb59a42093 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c  | |||
| @@ -291,7 +291,7 @@ static void default_enable(unsigned int irq) | |||
| 291 | { | 291 | { | 
| 292 | struct irq_desc *desc = irq_to_desc(irq); | 292 | struct irq_desc *desc = irq_to_desc(irq); | 
| 293 | 293 | ||
| 294 | desc->irq_data.chip->unmask(irq); | 294 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 
| 295 | desc->status &= ~IRQ_MASKED; | 295 | desc->status &= ~IRQ_MASKED; | 
| 296 | } | 296 | } | 
| 297 | 297 | ||
| @@ -330,6 +330,11 @@ static void compat_irq_mask(struct irq_data *data) | |||
| 330 | data->chip->mask(data->irq); | 330 | data->chip->mask(data->irq); | 
| 331 | } | 331 | } | 
| 332 | 332 | ||
| 333 | static void compat_irq_unmask(struct irq_data *data) | ||
| 334 | { | ||
| 335 | data->chip->unmask(data->irq); | ||
| 336 | } | ||
| 337 | |||
| 333 | static void compat_bus_lock(struct irq_data *data) | 338 | static void compat_bus_lock(struct irq_data *data) | 
| 334 | { | 339 | { | 
| 335 | data->chip->bus_lock(data->irq); | 340 | data->chip->bus_lock(data->irq); | 
| @@ -370,6 +375,9 @@ void irq_chip_set_defaults(struct irq_chip *chip) | |||
| 370 | 375 | ||
| 371 | if (chip->mask) | 376 | if (chip->mask) | 
| 372 | chip->irq_mask = compat_irq_mask; | 377 | chip->irq_mask = compat_irq_mask; | 
| 378 | |||
| 379 | if (chip->unmask) | ||
| 380 | chip->irq_unmask = compat_irq_unmask; | ||
| 373 | } | 381 | } | 
| 374 | 382 | ||
| 375 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 383 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 
| @@ -392,10 +400,10 @@ static inline void mask_irq(struct irq_desc *desc) | |||
| 392 | } | 400 | } | 
| 393 | } | 401 | } | 
| 394 | 402 | ||
| 395 | static inline void unmask_irq(struct irq_desc *desc, int irq) | 403 | static inline void unmask_irq(struct irq_desc *desc) | 
| 396 | { | 404 | { | 
| 397 | if (desc->irq_data.chip->unmask) { | 405 | if (desc->irq_data.chip->irq_unmask) { | 
| 398 | desc->irq_data.chip->unmask(irq); | 406 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 
| 399 | desc->status &= ~IRQ_MASKED; | 407 | desc->status &= ~IRQ_MASKED; | 
| 400 | } | 408 | } | 
| 401 | } | 409 | } | 
| @@ -524,7 +532,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
| 524 | desc->status &= ~IRQ_INPROGRESS; | 532 | desc->status &= ~IRQ_INPROGRESS; | 
| 525 | 533 | ||
| 526 | if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT))) | 534 | if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT))) | 
| 527 | unmask_irq(desc, irq); | 535 | unmask_irq(desc); | 
| 528 | out_unlock: | 536 | out_unlock: | 
| 529 | raw_spin_unlock(&desc->lock); | 537 | raw_spin_unlock(&desc->lock); | 
| 530 | } | 538 | } | 
| @@ -641,7 +649,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
| 641 | if (unlikely((desc->status & | 649 | if (unlikely((desc->status & | 
| 642 | (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == | 650 | (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == | 
| 643 | (IRQ_PENDING | IRQ_MASKED))) { | 651 | (IRQ_PENDING | IRQ_MASKED))) { | 
| 644 | unmask_irq(desc, irq); | 652 | unmask_irq(desc); | 
| 645 | } | 653 | } | 
| 646 | 654 | ||
| 647 | desc->status &= ~IRQ_PENDING; | 655 | desc->status &= ~IRQ_PENDING; | 
