ALSA: tea575x: use better card and bus names
Provide real card and bus_info instead of hardcoded values.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 98ccec2..4831800 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -178,8 +178,9 @@
struct snd_tea575x *tea = video_drvdata(file);
strlcpy(v->driver, "tea575x-tuner", sizeof(v->driver));
- strlcpy(v->card, tea->tea5759 ? "TEA5759" : "TEA5757", sizeof(v->card));
- sprintf(v->bus_info, "PCI");
+ strlcpy(v->card, tea->card, sizeof(v->card));
+ strlcat(v->card, tea->tea5759 ? " TEA5759" : " TEA5757", sizeof(v->card));
+ strlcpy(v->bus_info, tea->bus_info, sizeof(v->bus_info));
v->version = RADIO_VERSION;
v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
return 0;
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index ec7f837..ab0a615 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2795,6 +2795,8 @@
#ifdef CONFIG_SND_ES1968_RADIO
chip->tea.private_data = chip;
chip->tea.ops = &snd_es1968_tea_ops;
+ strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card));
+ sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
if (!snd_tea575x_init(&chip->tea))
printk(KERN_INFO "es1968: detected TEA575x radio\n");
#endif
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index ae5c270..05553da 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1232,6 +1232,7 @@
#ifdef TEA575X_RADIO
chip->tea.private_data = chip;
chip->tea.ops = &snd_fm801_tea_ops;
+ sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 &&
(tea575x_tuner & TUNER_TYPE_MASK) < 4) {
if (snd_tea575x_init(&chip->tea))
@@ -1246,6 +1247,7 @@
break;
}
}
+ strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card));
#endif
*rchip = chip;