@@ -18,6 +18,7 @@
#undef DEBUG
#undef VERBOSE_DEBUG
+#include <linux/find_atomic.h>
#include <linux/kernel.h>
#include <linux/sched/signal.h>
#include <linux/errno.h>
@@ -613,9 +614,8 @@ static void acm_softint(struct work_struct *work)
}
if (test_and_clear_bit(ACM_ERROR_DELAY, &acm->flags)) {
- for (i = 0; i < acm->rx_buflimit; i++)
- if (test_and_clear_bit(i, &acm->urbs_in_error_delay))
- acm_submit_read_urb(acm, i, GFP_KERNEL);
+ for_each_test_and_clear_bit(i, &acm->urbs_in_error_delay, acm->rx_buflimit)
+ acm_submit_read_urb(acm, i, GFP_KERNEL);
}
if (test_and_clear_bit(EVENT_TTY_WAKEUP, &acm->flags))