提交 3836ca08 编写于 作者: T Thomas Gleixner

genirq: Consolidate set_chip_handler functions

No need to have separate functions if we have one plus inline wrappers.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 02725e74
...@@ -398,23 +398,23 @@ extern struct irq_chip no_irq_chip; ...@@ -398,23 +398,23 @@ extern struct irq_chip no_irq_chip;
extern struct irq_chip dummy_irq_chip; extern struct irq_chip dummy_irq_chip;
extern void extern void
set_irq_chip_and_handler(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);
extern void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle, const char *name); 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 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); const char *name);
/*
* Set a highlevel flow handler for a given IRQ:
*/
static inline void 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) ...@@ -423,9 +423,9 @@ set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
* IRQ_NOREQUEST and IRQ_NOPROBE) * IRQ_NOREQUEST and IRQ_NOPROBE)
*/ */
static inline void 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); 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) ...@@ -579,6 +579,33 @@ static inline void set_irq_nested_thread(unsigned int irq, int nest)
{ {
irq_set_nested_thread(irq, 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 #endif
int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);
......
...@@ -600,7 +600,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) ...@@ -600,7 +600,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
} }
void 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) const char *name)
{ {
unsigned long flags; unsigned long flags;
...@@ -635,22 +635,14 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, ...@@ -635,22 +635,14 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
out: out:
irq_put_desc_busunlock(desc, flags); irq_put_desc_busunlock(desc, flags);
} }
EXPORT_SYMBOL_GPL(__set_irq_handler); EXPORT_SYMBOL_GPL(__irq_set_handler);
void void
set_irq_chip_and_handler(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)
{
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_flow_handler_t handle, const char *name) irq_flow_handler_t handle, const char *name)
{ {
irq_set_chip(irq, chip); 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) void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册