Skip to content

Commit

Permalink
irq: Export functions to allow modular irq drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Thomas Gleixner committed May 18, 2011
1 parent fe12bc2 commit edf76f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
out_unlock:
raw_spin_unlock(&desc->lock);
}
EXPORT_SYMBOL_GPL(handle_simple_irq);

/**
* handle_level_irq - Level type irq handler
Expand Down Expand Up @@ -613,6 +614,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)

irq_put_desc_unlock(desc, flags);
}
EXPORT_SYMBOL_GPL(irq_modify_status);

/**
* irq_cpu_online - Invoke all irq_cpu_online functions.
Expand Down
3 changes: 3 additions & 0 deletions kernel/irq/irqdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ int generic_handle_irq(unsigned int irq)
generic_handle_irq_desc(irq, desc);
return 0;
}
EXPORT_SYMBOL_GPL(generic_handle_irq);

/* Dynamic interrupt handling */

Expand All @@ -326,6 +327,7 @@ void irq_free_descs(unsigned int from, unsigned int cnt)
bitmap_clear(allocated_irqs, from, cnt);
mutex_unlock(&sparse_irq_lock);
}
EXPORT_SYMBOL_GPL(irq_free_descs);

/**
* irq_alloc_descs - allocate and initialize a range of irq descriptors
Expand Down Expand Up @@ -366,6 +368,7 @@ irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node)
mutex_unlock(&sparse_irq_lock);
return ret;
}
EXPORT_SYMBOL_GPL(irq_alloc_descs);

/**
* irq_reserve_irqs - mark irqs allocated
Expand Down

0 comments on commit edf76f8

Please sign in to comment.