|
@@ -998,6 +998,10 @@ static int soc_probe_platform(struct snd_soc_card *card,
|
|
if (!try_module_get(platform->dev->driver->owner))
|
|
if (!try_module_get(platform->dev->driver->owner))
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
+ if (driver->dapm_widgets)
|
|
|
|
+ snd_soc_dapm_new_controls(&platform->dapm,
|
|
|
|
+ driver->dapm_widgets, driver->num_dapm_widgets);
|
|
|
|
+
|
|
if (driver->probe) {
|
|
if (driver->probe) {
|
|
ret = driver->probe(platform);
|
|
ret = driver->probe(platform);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
@@ -1008,6 +1012,13 @@ static int soc_probe_platform(struct snd_soc_card *card,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (driver->controls)
|
|
|
|
+ snd_soc_add_platform_controls(platform, driver->controls,
|
|
|
|
+ driver->num_controls);
|
|
|
|
+ if (driver->dapm_routes)
|
|
|
|
+ snd_soc_dapm_add_routes(&platform->dapm, driver->dapm_routes,
|
|
|
|
+ driver->num_dapm_routes);
|
|
|
|
+
|
|
/* mark platform as probed and add to card platform list */
|
|
/* mark platform as probed and add to card platform list */
|
|
platform->probed = 1;
|
|
platform->probed = 1;
|
|
list_add(&platform->card_list, &card->platform_dev_list);
|
|
list_add(&platform->card_list, &card->platform_dev_list);
|