Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85872
b: refs/heads/master
c: 89d694b
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 19, 2008
1 parent 87d3e1c commit 62e4a72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 188fd89d539d899bfca2bc83534e5508e0161139
refs/heads/master: 89d694b9dbe769ca1004e01db0ca43964806a611
20 changes: 19 additions & 1 deletion trunk/kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ static unsigned int default_startup(unsigned int irq)
return 0;
}

/*
* default shutdown function
*/
static void default_shutdown(unsigned int irq)
{
struct irq_desc *desc = irq_desc + irq;

desc->chip->mask(irq);
desc->status |= IRQ_MASKED;
}

/*
* Fixup enable/disable function pointers
*/
Expand All @@ -256,8 +267,15 @@ void irq_chip_set_defaults(struct irq_chip *chip)
chip->disable = default_disable;
if (!chip->startup)
chip->startup = default_startup;
/*
* We use chip->disable, when the user provided its own. When
* we have default_disable set for chip->disable, then we need
* to use default_shutdown, otherwise the irq line is not
* disabled on free_irq():
*/
if (!chip->shutdown)
chip->shutdown = chip->disable;
chip->shutdown = chip->disable != default_disable ?
chip->disable : default_shutdown;
if (!chip->name)
chip->name = chip->typename;
if (!chip->end)
Expand Down

0 comments on commit 62e4a72

Please sign in to comment.