Skip to content

Commit

Permalink
ALSA: emu10k1: Drop superfluous id-uniquification behavior
Browse files Browse the repository at this point in the history
The emu10k1 driver tries to create a unique id string by itself when
it's copied from the card list, but it's rather superfluous, as the
same thing will be done in ALSA core side at the card registration.
Let's drop the code.  This allows us removing snd_cards export.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Apr 17, 2019
1 parent b5fd12d commit c989954
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions sound/pci/emu10k1/emu10k1_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1882,22 +1882,8 @@ int snd_emu10k1_create(struct snd_card *card,
c->name, pci->vendor, pci->device,
emu->serial);

if (!*card->id && c->id) {
int i, n = 0;
if (!*card->id && c->id)
strlcpy(card->id, c->id, sizeof(card->id));
for (;;) {
for (i = 0; i < snd_ecards_limit; i++) {
if (snd_cards[i] && !strcmp(snd_cards[i]->id, card->id))
break;
}
if (i >= snd_ecards_limit)
break;
n++;
if (n >= SNDRV_CARDS)
break;
snprintf(card->id, sizeof(card->id), "%s_%d", c->id, n);
}
}

is_audigy = emu->audigy = c->emu10k2_chip;

Expand Down

0 comments on commit c989954

Please sign in to comment.