Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116380
b: refs/heads/master
c: 377bf1e
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Ingo Molnar committed Aug 22, 2008
1 parent 9ce7ee8 commit 4aa408a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 8d00a6c8f6b08e7167bc03bf955cdc7e47c5132e
refs/heads/master: 377bf1e4ac2d894791733270604594c7c851ef83
17 changes: 10 additions & 7 deletions trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,26 +596,29 @@ int request_irq(unsigned int irq, irq_handler_t handler,
action->next = NULL;
action->dev_id = dev_id;

retval = setup_irq(irq, action);
if (retval)
kfree(action);

#ifdef CONFIG_DEBUG_SHIRQ
if (irqflags & IRQF_SHARED) {
/*
* It's a shared IRQ -- the driver ought to be prepared for it
* to happen immediately, so let's make sure....
* We do this before actually registering it, to make sure that
* a 'real' IRQ doesn't run in parallel with our fake
* We disable the irq to make sure that a 'real' IRQ doesn't
* run in parallel with our fake.
*/
unsigned long flags;

disable_irq(irq);
local_irq_save(flags);

handler(irq, dev_id);

local_irq_restore(flags);
enable_irq(irq);
}
#endif

retval = setup_irq(irq, action);
if (retval)
kfree(action);

return retval;
}
EXPORT_SYMBOL(request_irq);

0 comments on commit 4aa408a

Please sign in to comment.