Skip to content

Commit

Permalink
[POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver
Browse files Browse the repository at this point in the history
Uninline virq_to_hw and export it so modules can use it. The alternative
would be to export the irq_map array instead, but it's an infrequently
called function, and keeping the array unexported seems considerably
cleaner.

This is needed so that the pasemi_mac driver can be compiled as a module.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Olof Johansson authored and Paul Mackerras committed Jul 2, 2007
1 parent ee5d1b7 commit 9f79058
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ struct irq_map_entry irq_map[NR_IRQS];
static unsigned int irq_virq_count = NR_IRQS;
static struct irq_host *irq_default_host;

irq_hw_number_t virq_to_hw(unsigned int virq)
{
return irq_map[virq].hwirq;
}
EXPORT_SYMBOL_GPL(virq_to_hw);

struct irq_host *irq_alloc_host(unsigned int revmap_type,
unsigned int revmap_arg,
struct irq_host_ops *ops,
Expand Down
5 changes: 1 addition & 4 deletions include/asm-powerpc/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ struct irq_map_entry {

extern struct irq_map_entry irq_map[NR_IRQS];

static inline irq_hw_number_t virq_to_hw(unsigned int virq)
{
return irq_map[virq].hwirq;
}
extern irq_hw_number_t virq_to_hw(unsigned int virq);

/**
* irq_alloc_host - Allocate a new irq_host data structure
Expand Down

0 comments on commit 9f79058

Please sign in to comment.