Comments
Patch
@@ -606,6 +606,7 @@ struct snd_soc_dai_link {
struct snd_soc_card {
const char *name;
const char *long_name;
+ const char *driver_name;
struct device *dev;
struct snd_card *snd_card;
struct module *owner;
@@ -717,8 +717,8 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_sdp4430 = {
- .name = "SDP4430",
- .long_name = "TI OMAP4 SDP4430 Board",
+ .driver_name = "OMAP4",
+ .long_name = "TI OMAP4 Board",
.dai_link = sdp4430_dai,
.num_links = ARRAY_SIZE(sdp4430_dai),
};
@@ -736,6 +736,11 @@ static int __init sdp4430_soc_init(void)
}
printk(KERN_INFO "SDP4430 SoC init\n");
+ if (machine_is_omap_4430sdp())
+ snd_soc_sdp4430.name = "SDP4430";
+ else if (machine_is_omap4_panda())
+ snd_soc_sdp4430.name = "Panda";
+
sdp4430_snd_device = platform_device_alloc("soc-audio", -1);
if (!sdp4430_snd_device) {
printk(KERN_ERR "Platform device allocation failed\n");
@@ -1773,7 +1773,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
"%s", card->long_name);
snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
- "%s", card->name);
+ "%s", card->driver_name);
ret = snd_card_register(card->snd_card);
if (ret < 0) {