Merge tag 'for-linus-20160216' of git://git.infradead.org/intel-iommu
[cascardo/linux.git] / lib / irq_poll.c
index 43a3370..836f7db 100644 (file)
@@ -29,7 +29,7 @@ void irq_poll_sched(struct irq_poll *iop)
 
        if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
                return;
-       if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
+       if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
                return;
 
        local_irq_save(flags);
@@ -47,13 +47,12 @@ EXPORT_SYMBOL(irq_poll_sched);
  *     See irq_poll_complete(). This function must be called with interrupts
  *     disabled.
  **/
-void __irq_poll_complete(struct irq_poll *iop)
+static void __irq_poll_complete(struct irq_poll *iop)
 {
        list_del(&iop->list);
        smp_mb__before_atomic();
        clear_bit_unlock(IRQ_POLL_F_SCHED, &iop->state);
 }
-EXPORT_SYMBOL(__irq_poll_complete);
 
 /**
  * irq_poll_complete - Mark this @iop as un-polled again
@@ -122,7 +121,7 @@ static void irq_poll_softirq(struct softirq_action *h)
                 * move the instance around on the list at-will.
                 */
                if (work >= weight) {
-                       if (irq_poll_disable_pending(iop))
+                       if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
                                __irq_poll_complete(iop);
                        else
                                list_move_tail(&iop->list, list);