Lines Matching refs:avail
136 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create()
137 if (!iv->avail) in airq_iv_create()
139 memset(iv->avail, 0xff, size); in airq_iv_create()
166 kfree(iv->avail); in airq_iv_create()
184 kfree(iv->avail); in airq_iv_release()
202 if (!iv->avail || num == 0) in airq_iv_alloc()
205 bit = find_first_bit_inv(iv->avail, iv->bits); in airq_iv_alloc()
208 if (!test_bit_inv(bit + i, iv->avail)) in airq_iv_alloc()
213 clear_bit_inv(bit + i, iv->avail); in airq_iv_alloc()
218 bit = find_next_bit_inv(iv->avail, iv->bits, bit + i + 1); in airq_iv_alloc()
237 if (!iv->avail || num == 0) in airq_iv_free()
244 set_bit_inv(bit + i, iv->avail); in airq_iv_free()
248 while (iv->end > 0 && !test_bit_inv(iv->end - 1, iv->avail)) in airq_iv_free()