Commit 190006f9 authored by Joe Perches's avatar Joe Perches Committed by Takashi Iwai
Browse files

ALSA: usb-audio: use bitmap_weight



Use bitmap_weight to count the total number of bits set in bitmap.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 701ef320
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -485,15 +485,10 @@ __exit_unlock:
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;