@@ -95,6 +95,8 @@ enum irq_domain_bus_token {
* @unmap: Dispose of such a mapping
* @xlate: Given a device tree node and interrupt specifier, decode
* the hardware irq number and linux irq type value.
+ * @remove: Free any custom resources associated with this domain. This is
+ * called from irq_domain_remove() before any other code.
*
* Functions below are provided by the driver and called whenever a new mapping
* is created or an old mapping is disposed. The driver can then proceed to
@@ -126,6 +128,7 @@ struct irq_domain_ops {
void (*debug_show)(struct seq_file *m, struct irq_domain *d,
struct irq_data *irqd, int ind);
#endif
+ void (*remove)(struct irq_domain *d);
};
extern struct irq_domain_ops irq_generic_chip_ops;
@@ -242,6 +242,9 @@ EXPORT_SYMBOL_GPL(__irq_domain_add);
*/
void irq_domain_remove(struct irq_domain *domain)
{
+ if (domain->ops->remove)
+ domain->ops->remove(domain);
+
mutex_lock(&irq_domain_mutex);
debugfs_remove_domain_dir(domain);