aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-05-18 05:39:04 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-05-18 08:59:08 -0400
commitedf76f8307c350bcb81f0c760118a991b3e62956 (patch)
tree35adb6aa29f61f64f5841b1ccb2e6a50eb250529
parentfe12bc2c996d3e492b2920e32ac79f7bbae3e15d (diff)
irq: Export functions to allow modular irq drivers
Export handle_simple_irq, irq_modify_status, irq_alloc_descs, irq_free_descs and generic_handle_irq to allow their usage in modules. First user is IIO, which wants to be built modular, but needs to be able to create irq chips, allocate and configure interrupt descriptors and handle demultiplexing interrupts. [ tglx: Moved the uninlinig of generic_handle_irq to a separate patch ] Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Link: http://lkml.kernel.org/r/%3C1305711544-505-1-git-send-email-jic23%40cam.ac.uk%3E Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/irq/chip.c2
-rw-r--r--kernel/irq/irqdesc.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 52d856d513ff..d5a3009da71a 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -310,6 +310,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
310out_unlock: 310out_unlock:
311 raw_spin_unlock(&desc->lock); 311 raw_spin_unlock(&desc->lock);
312} 312}
313EXPORT_SYMBOL_GPL(handle_simple_irq);
313 314
314/** 315/**
315 * handle_level_irq - Level type irq handler 316 * handle_level_irq - Level type irq handler
@@ -613,6 +614,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
613 614
614 irq_put_desc_unlock(desc, flags); 615 irq_put_desc_unlock(desc, flags);
615} 616}
617EXPORT_SYMBOL_GPL(irq_modify_status);
616 618
617/** 619/**
618 * irq_cpu_online - Invoke all irq_cpu_online functions. 620 * irq_cpu_online - Invoke all irq_cpu_online functions.
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 9f65b0225d6a..886e80347b32 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -304,6 +304,7 @@ int generic_handle_irq(unsigned int irq)
304 generic_handle_irq_desc(irq, desc); 304 generic_handle_irq_desc(irq, desc);
305 return 0; 305 return 0;
306} 306}
307EXPORT_SYMBOL_GPL(generic_handle_irq);
307 308
308/* Dynamic interrupt handling */ 309/* Dynamic interrupt handling */
309 310
@@ -326,6 +327,7 @@ void irq_free_descs(unsigned int from, unsigned int cnt)
326 bitmap_clear(allocated_irqs, from, cnt); 327 bitmap_clear(allocated_irqs, from, cnt);
327 mutex_unlock(&sparse_irq_lock); 328 mutex_unlock(&sparse_irq_lock);
328} 329}
330EXPORT_SYMBOL_GPL(irq_free_descs);
329 331
330/** 332/**
331 * irq_alloc_descs - allocate and initialize a range of irq descriptors 333 * irq_alloc_descs - allocate and initialize a range of irq descriptors
@@ -366,6 +368,7 @@ err:
366 mutex_unlock(&sparse_irq_lock); 368 mutex_unlock(&sparse_irq_lock);
367 return ret; 369 return ret;
368} 370}
371EXPORT_SYMBOL_GPL(irq_alloc_descs);
369 372
370/** 373/**
371 * irq_reserve_irqs - mark irqs allocated 374 * irq_reserve_irqs - mark irqs allocated