ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / irq.c
index 71ccdbfed66276f2c76db1b683da17cab392f0ad..8349d4e97e2b8b9b7bb5672b2cf974c2cdb74fd0 100644 (file)
@@ -155,10 +155,10 @@ static bool migrate_one_irq(struct irq_desc *desc)
        }
 
        c = irq_data_get_irq_chip(d);
-       if (c->irq_set_affinity)
-               c->irq_set_affinity(d, affinity, true);
-       else
+       if (!c->irq_set_affinity)
                pr_debug("IRQ%u: unable to set affinity\n", d->irq);
+       else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
+               cpumask_copy(d->affinity, affinity);
 
        return ret;
 }