static void irq_kobj_release(struct kobject *kobj) { struct irq_desc *desc = container_of(kobj, struct irq_desc, kobj); free_masks(desc); free_percpu(desc->kstat_irqs); kfree(desc); }
static void free_desc(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); unregister_irq_proc(irq, desc); mutex_lock(&sparse_irq_lock); delete_irq_desc(irq); mutex_unlock(&sparse_irq_lock); free_masks(desc); free_percpu(desc->kstat_irqs); kfree(desc); }
static void free_desc(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); unregister_irq_proc(irq, desc); /* * sparse_irq_lock protects also show_interrupts() and * kstat_irq_usr(). Once we deleted the descriptor from the * sparse tree we can free it. Access in proc will fail to * lookup the descriptor. */ mutex_lock(&sparse_irq_lock); delete_irq_desc(irq); mutex_unlock(&sparse_irq_lock); free_masks(desc); free_percpu(desc->kstat_irqs); kfree(desc); }