Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116541
b: refs/heads/master
c: c6b7674
h: refs/heads/master
i:
  116539: f555c4c
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Oct 16, 2008
1 parent 623c474 commit 8240ed2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 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: 70dd4d992ab324a59cdcd6bedc3f4e729863d514
refs/heads/master: c6b7674f323622d86316bf7951ad9cae1ce24642
15 changes: 13 additions & 2 deletions trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ struct irq_desc {
const char *name;
} ____cacheline_internodealigned_in_smp;

extern struct irq_desc *irq_to_desc(unsigned int irq);
extern struct irq_desc *irq_to_desc_alloc(unsigned int irq);

#ifndef CONFIG_HAVE_SPARSE_IRQ

Expand All @@ -216,8 +214,21 @@ extern struct irq_desc irq_desc[NR_IRQS];
extern struct irq_desc *irq_desc;
#endif

static inline struct irq_desc *irq_to_desc(unsigned int irq)
{
return (irq < nr_irqs) ? irq_desc + irq : NULL;
}

static inline struct irq_desc *irq_to_desc_alloc(unsigned int irq)
{
return irq_to_desc(irq);
}

#else

extern struct irq_desc *irq_to_desc(unsigned int irq);
extern struct irq_desc *irq_to_desc_alloc(unsigned int irq);

extern struct irq_desc *sparse_irqs;
#define for_each_irq_desc(irqX, desc) \
for (desc = sparse_irqs, irqX = desc->irq; desc; desc = desc->next, irqX = desc ? desc->irq : -1U)
Expand Down
14 changes: 0 additions & 14 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,6 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {

#endif

#ifndef CONFIG_HAVE_SPARSE_IRQ
struct irq_desc *irq_to_desc(unsigned int irq)
{
if (irq < nr_irqs)
return &irq_desc[irq];

return NULL;
}
struct irq_desc *irq_to_desc_alloc(unsigned int irq)
{
return irq_to_desc(irq);
}
#endif

/*
* What should we do if we get a hw irq event on an illegal vector?
* Each architecture has to answer this themself.
Expand Down

0 comments on commit 8240ed2

Please sign in to comment.