diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-18 06:48:00 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-18 08:59:08 -0400 |
commit | fe12bc2c996d3e492b2920e32ac79f7bbae3e15d (patch) | |
tree | 05af87563123d909d04c328aead3fe24599633d1 /include/linux | |
parent | fe0514348452f5b0ad7e842b0d71b8322b1297de (diff) |
genirq: Uninline and sanity check generic_handle_irq()
generic_handle_irq() is missing a NULL pointer check for the result of
irq_to_desc. This was a not a big problem, but we want to expose it to
drivers, so we better have sanity checks in place. Add a return value
as well, which indicates that the irq number was valid and the handler
was invoked.
Based on the pure code move from Jonathan Cameron.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irqdesc.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index c70b1aa4b93a..2d921b35212c 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -111,10 +111,7 @@ static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *de | |||
111 | desc->handle_irq(irq, desc); | 111 | desc->handle_irq(irq, desc); |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline void generic_handle_irq(unsigned int irq) | 114 | int generic_handle_irq(unsigned int irq); |
115 | { | ||
116 | generic_handle_irq_desc(irq, irq_to_desc(irq)); | ||
117 | } | ||
118 | 115 | ||
119 | /* Test to see if a driver has successfully requested an irq */ | 116 | /* Test to see if a driver has successfully requested an irq */ |
120 | static inline int irq_has_action(unsigned int irq) | 117 | static inline int irq_has_action(unsigned int irq) |