Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[deliverable/linux.git] / kernel / irq / irqdomain.c
index b57a3776de44dd833eb9a545dced819d69e5fa51..200ce832c58543785f62f3c4b6e4d80dcddc80f1 100644 (file)
@@ -20,15 +20,15 @@ static DEFINE_MUTEX(irq_domain_mutex);
 void irq_domain_add(struct irq_domain *domain)
 {
        struct irq_data *d;
-       int hwirq;
+       int hwirq, irq;
 
        /*
         * This assumes that the irq_domain owner has already allocated
         * the irq_descs.  This block will be removed when support for dynamic
         * allocation of irq_descs is added to irq_domain.
         */
-       for (hwirq = 0; hwirq < domain->nr_irq; hwirq++) {
-               d = irq_get_irq_data(irq_domain_to_irq(domain, hwirq));
+       irq_domain_for_each_irq(domain, hwirq, irq) {
+               d = irq_get_irq_data(irq);
                if (!d) {
                        WARN(1, "error: assigning domain to non existant irq_desc");
                        return;
@@ -54,15 +54,15 @@ void irq_domain_add(struct irq_domain *domain)
 void irq_domain_del(struct irq_domain *domain)
 {
        struct irq_data *d;
-       int hwirq;
+       int hwirq, irq;
 
        mutex_lock(&irq_domain_mutex);
        list_del(&domain->list);
        mutex_unlock(&irq_domain_mutex);
 
        /* Clear the irq_domain assignments */
-       for (hwirq = 0; hwirq < domain->nr_irq; hwirq++) {
-               d = irq_get_irq_data(irq_domain_to_irq(domain, hwirq));
+       irq_domain_for_each_irq(domain, hwirq, irq) {
+               d = irq_get_irq_data(irq);
                d->domain = NULL;
        }
 }
This page took 0.025926 seconds and 5 git commands to generate.