Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170105
b: refs/heads/master
c: fbc5439
h: refs/heads/master
i:
  170103: 855d45b
v: v3
  • Loading branch information
Akinobu Mita authored and Takashi Iwai committed Nov 20, 2009
1 parent 86b53b4 commit b51117c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d867bba94513cf149cb8462a6e006848acb91d38
refs/heads/master: fbc543915ffb8ec5c35403f294ab799f1936f42a
13 changes: 2 additions & 11 deletions trunk/sound/usb/usbmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,15 +1062,6 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi,
return 0;
}

static unsigned int snd_usbmidi_count_bits(unsigned int x)
{
unsigned int bits;

for (bits = 0; x; ++bits)
x &= x - 1;
return bits;
}

/*
* Frees an output endpoint.
* May be called when ep hasn't been initialized completely.
Expand Down Expand Up @@ -1914,8 +1905,8 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip,
out_ports = 0;
in_ports = 0;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
out_ports += snd_usbmidi_count_bits(endpoints[i].out_cables);
in_ports += snd_usbmidi_count_bits(endpoints[i].in_cables);
out_ports += hweight16(endpoints[i].out_cables);
in_ports += hweight16(endpoints[i].in_cables);
}
err = snd_usbmidi_create_rawmidi(umidi, out_ports, in_ports);
if (err < 0) {
Expand Down

0 comments on commit b51117c

Please sign in to comment.