genirq: Consolidate set_chip_handler functions

No need to have separate functions if we have one plus inline wrappers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2011-02-14 20:09:19 +01:00
parent 02725e7471
commit 3836ca08aa
2 changed files with 43 additions and 24 deletions

View file

@ -398,23 +398,23 @@ extern struct irq_chip no_irq_chip;
extern struct irq_chip dummy_irq_chip;
extern void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle);
extern void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle, const char *name);
static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle)
{
irq_set_chip_and_handler_name(irq, chip, handle, NULL);
}
extern void
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
const char *name);
/*
* Set a highlevel flow handler for a given IRQ:
*/
static inline void
set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
irq_set_handler(unsigned int irq, irq_flow_handler_t handle)
{
__set_irq_handler(irq, handle, 0, NULL);
__irq_set_handler(irq, handle, 0, NULL);
}
/*
@ -423,9 +423,9 @@ set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
* IRQ_NOREQUEST and IRQ_NOPROBE)
*/
static inline void
set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)
irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle)
{
__set_irq_handler(irq, handle, 1, NULL);
__irq_set_handler(irq, handle, 1, NULL);
}
void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set);
@ -579,6 +579,33 @@ static inline void set_irq_nested_thread(unsigned int irq, int nest)
{
irq_set_nested_thread(irq, nest);
}
static inline void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle, const char *name)
{
irq_set_chip_and_handler_name(irq, chip, handle, name);
}
static inline void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle)
{
irq_set_chip_and_handler(irq, chip, handle);
}
static inline void
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
const char *name)
{
__irq_set_handler(irq, handle, is_chained, name);
}
static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
{
irq_set_handler(irq, handle);
}
static inline void
set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)
{
irq_set_chained_handler(irq, handle);
}
#endif
int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);

View file

@ -600,7 +600,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
}
void
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
const char *name)
{
unsigned long flags;
@ -635,22 +635,14 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
out:
irq_put_desc_busunlock(desc, flags);
}
EXPORT_SYMBOL_GPL(__set_irq_handler);
EXPORT_SYMBOL_GPL(__irq_set_handler);
void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle)
{
irq_set_chip(irq, chip);
__set_irq_handler(irq, handle, 0, NULL);
}
void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle, const char *name)
{
irq_set_chip(irq, chip);
__set_irq_handler(irq, handle, 0, name);
__irq_set_handler(irq, handle, 0, name);
}
void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)