提交 190006f9 编写于 作者: J Joe Perches 提交者: Takashi Iwai

ALSA: usb-audio: use bitmap_weight

Use bitmap_weight to count the total number of bits set in bitmap.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 701ef320
......@@ -485,15 +485,10 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
static int wait_clear_urbs(struct snd_usb_endpoint *ep)
{
unsigned long end_time = jiffies + msecs_to_jiffies(1000);
unsigned int i;
int alive;
do {
alive = 0;
for (i = 0; i < ep->nurbs; i++)
if (test_bit(i, &ep->active_mask))
alive++;
alive = bitmap_weight(&ep->active_mask, ep->nurbs);
if (!alive)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册