Lines Matching refs:rpipe_idx
148 static unsigned rpipe_get_idx(struct wahc *wa, unsigned rpipe_idx) in rpipe_get_idx() argument
153 rpipe_idx = find_next_zero_bit(wa->rpipe_bm, wa->rpipes, rpipe_idx); in rpipe_get_idx()
154 if (rpipe_idx < wa->rpipes) in rpipe_get_idx()
155 set_bit(rpipe_idx, wa->rpipe_bm); in rpipe_get_idx()
158 return rpipe_idx; in rpipe_get_idx()
161 static void rpipe_put_idx(struct wahc *wa, unsigned rpipe_idx) in rpipe_put_idx() argument
166 clear_bit(rpipe_idx, wa->rpipe_bm); in rpipe_put_idx()
197 unsigned rpipe_idx; in rpipe_get_idle() local
207 for (rpipe_idx = 0; rpipe_idx < wa->rpipes; rpipe_idx++) { in rpipe_get_idle()
208 rpipe_idx = rpipe_get_idx(wa, rpipe_idx); in rpipe_get_idle()
209 if (rpipe_idx >= wa->rpipes) /* no more pipes :( */ in rpipe_get_idle()
211 result = __rpipe_get_descr(wa, &rpipe->descr, rpipe_idx); in rpipe_get_idle()
214 rpipe_idx, result); in rpipe_get_idle()
217 rpipe_put_idx(wa, rpipe_idx); in rpipe_get_idle()
224 set_bit(rpipe_idx, wa->rpipe_bm); in rpipe_get_idle()