aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1_main.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-04-16 18:01:46 +0200
committerTakashi Iwai <tiwai@suse.de>2019-04-17 07:16:12 +0200
commitc989954938761a2939a21fcbc768af182de6be58 (patch)
tree41ff5480dd9908a959d0cb22e3cbe4c0bbda0f53 /sound/pci/emu10k1/emu10k1_main.c
parentb5fd12d6c0fc64c2c2b5ae095e63824083d27151 (diff)
downloadlinux-c989954938761a2939a21fcbc768af182de6be58.tar.gz
ALSA: emu10k1: Drop superfluous id-uniquification behavior
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 <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_main.c')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 61f85ff91cd9a..0419c75bdf5ab 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -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;