diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2012-04-03 09:11:04 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2012-04-11 00:39:17 -0400 |
| commit | a699e4e49ec3fb62c4a44394357d14081df10bef (patch) | |
| tree | 4a64e6fd8bc6a71fe7212a69f552f4aef3bd473c | |
| parent | 5b7526e3a640e491075557acaa842c59c652c0c3 (diff) | |
irq: Kill pointless irqd_to_hw export
It makes no sense to export this trivial function. Make it a static inline
instead.
This patch also drops virq_to_hw from arch/c6x since it is unused by that
architecture.
v2: Move irq_hw_number_t into types.h to fix ARM build failure
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| -rw-r--r-- | arch/c6x/include/asm/irq.h | 4 | ||||
| -rw-r--r-- | arch/c6x/kernel/irq.c | 13 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/irq.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/irq.c | 6 | ||||
| -rw-r--r-- | include/linux/irq.h | 5 | ||||
| -rw-r--r-- | include/linux/irqdomain.h | 6 | ||||
| -rw-r--r-- | include/linux/types.h | 6 |
7 files changed, 11 insertions, 31 deletions
diff --git a/arch/c6x/include/asm/irq.h b/arch/c6x/include/asm/irq.h index f13b78d5e1ca..ab4577f93d96 100644 --- a/arch/c6x/include/asm/irq.h +++ b/arch/c6x/include/asm/irq.h | |||
| @@ -42,10 +42,6 @@ | |||
| 42 | /* This number is used when no interrupt has been assigned */ | 42 | /* This number is used when no interrupt has been assigned */ |
| 43 | #define NO_IRQ 0 | 43 | #define NO_IRQ 0 |
| 44 | 44 | ||
| 45 | struct irq_data; | ||
| 46 | extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d); | ||
| 47 | extern irq_hw_number_t virq_to_hw(unsigned int virq); | ||
| 48 | |||
| 49 | extern void __init init_pic_c64xplus(void); | 45 | extern void __init init_pic_c64xplus(void); |
| 50 | 46 | ||
| 51 | extern void init_IRQ(void); | 47 | extern void init_IRQ(void); |
diff --git a/arch/c6x/kernel/irq.c b/arch/c6x/kernel/irq.c index 65b8ddf54b44..c90fb5e82ad7 100644 --- a/arch/c6x/kernel/irq.c +++ b/arch/c6x/kernel/irq.c | |||
| @@ -130,16 +130,3 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
| 130 | seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); | 130 | seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); |
| 131 | return 0; | 131 | return 0; |
| 132 | } | 132 | } |
| 133 | |||
| 134 | irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | ||
| 135 | { | ||
| 136 | return d->hwirq; | ||
| 137 | } | ||
| 138 | EXPORT_SYMBOL_GPL(irqd_to_hwirq); | ||
| 139 | |||
| 140 | irq_hw_number_t virq_to_hw(unsigned int virq) | ||
| 141 | { | ||
| 142 | struct irq_data *irq_data = irq_get_irq_data(virq); | ||
| 143 | return WARN_ON(!irq_data) ? 0 : irq_data->hwirq; | ||
| 144 | } | ||
| 145 | EXPORT_SYMBOL_GPL(virq_to_hw); | ||
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index cf417e510736..e648af92ced1 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
| @@ -33,8 +33,6 @@ extern atomic_t ppc_n_lost_interrupts; | |||
| 33 | /* Same thing, used by the generic IRQ code */ | 33 | /* Same thing, used by the generic IRQ code */ |
| 34 | #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS | 34 | #define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS |
| 35 | 35 | ||
| 36 | struct irq_data; | ||
| 37 | extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d); | ||
| 38 | extern irq_hw_number_t virq_to_hw(unsigned int virq); | 36 | extern irq_hw_number_t virq_to_hw(unsigned int virq); |
| 39 | 37 | ||
| 40 | /** | 38 | /** |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 243dbabfe74d..5ec1b2354ca6 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
| @@ -560,12 +560,6 @@ void do_softirq(void) | |||
| 560 | local_irq_restore(flags); | 560 | local_irq_restore(flags); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | ||
| 564 | { | ||
| 565 | return d->hwirq; | ||
| 566 | } | ||
| 567 | EXPORT_SYMBOL_GPL(irqd_to_hwirq); | ||
| 568 | |||
| 569 | irq_hw_number_t virq_to_hw(unsigned int virq) | 563 | irq_hw_number_t virq_to_hw(unsigned int virq) |
| 570 | { | 564 | { |
| 571 | struct irq_data *irq_data = irq_get_irq_data(virq); | 565 | struct irq_data *irq_data = irq_get_irq_data(virq); |
diff --git a/include/linux/irq.h b/include/linux/irq.h index bff29c58da23..7810406f3d80 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -263,6 +263,11 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | |||
| 263 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; | 263 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | ||
| 267 | { | ||
| 268 | return d->hwirq; | ||
| 269 | } | ||
| 270 | |||
| 266 | /** | 271 | /** |
| 267 | * struct irq_chip - hardware interrupt chip descriptor | 272 | * struct irq_chip - hardware interrupt chip descriptor |
| 268 | * | 273 | * |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index ead4a4215797..ac17b9b2e7be 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -42,12 +42,6 @@ struct of_device_id; | |||
| 42 | /* Number of irqs reserved for a legacy isa controller */ | 42 | /* Number of irqs reserved for a legacy isa controller */ |
| 43 | #define NUM_ISA_INTERRUPTS 16 | 43 | #define NUM_ISA_INTERRUPTS 16 |
| 44 | 44 | ||
| 45 | /* This type is the placeholder for a hardware interrupt number. It has to | ||
| 46 | * be big enough to enclose whatever representation is used by a given | ||
| 47 | * platform. | ||
| 48 | */ | ||
| 49 | typedef unsigned long irq_hw_number_t; | ||
| 50 | |||
| 51 | /** | 45 | /** |
| 52 | * struct irq_domain_ops - Methods for irq_domain objects | 46 | * struct irq_domain_ops - Methods for irq_domain objects |
| 53 | * @match: Match an interrupt controller device node to a host, returns | 47 | * @match: Match an interrupt controller device node to a host, returns |
diff --git a/include/linux/types.h b/include/linux/types.h index e5fa50345516..7f480db60231 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -210,6 +210,12 @@ typedef u32 phys_addr_t; | |||
| 210 | 210 | ||
| 211 | typedef phys_addr_t resource_size_t; | 211 | typedef phys_addr_t resource_size_t; |
| 212 | 212 | ||
| 213 | /* | ||
| 214 | * This type is the placeholder for a hardware interrupt number. It has to be | ||
| 215 | * big enough to enclose whatever representation is used by a given platform. | ||
| 216 | */ | ||
| 217 | typedef unsigned long irq_hw_number_t; | ||
| 218 | |||
| 213 | typedef struct { | 219 | typedef struct { |
| 214 | int counter; | 220 | int counter; |
| 215 | } atomic_t; | 221 | } atomic_t; |
