summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_max98095.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/tegra/tegra_max98095.c')
-rw-r--r--sound/soc/tegra/tegra_max98095.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_max98095.c b/sound/soc/tegra/tegra_max98095.c
index 95295ef4151e..d065b78164ac 100644
--- a/sound/soc/tegra/tegra_max98095.c
+++ b/sound/soc/tegra/tegra_max98095.c
@@ -542,6 +542,10 @@ static int tegra_max98095_init(struct snd_soc_pcm_runtime *rtd)
tegra_max98095_hp_jack_pins);
#endif
+ ret = tegra_asoc_utils_register_ctls(&machine->util_data);
+ if (ret < 0)
+ return ret;
+
/* max98095_headset_detect(codec, &tegra_max98095_hp_jack,
SND_JACK_HEADSET); */
@@ -577,6 +581,7 @@ static struct snd_soc_dai_link tegra_max98095_dai[] = {
};
static int tegra30_soc_set_bias_level(struct snd_soc_card *card,
+ struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
struct tegra_max98095 *machine = snd_soc_card_get_drvdata(card);
@@ -591,6 +596,7 @@ static int tegra30_soc_set_bias_level(struct snd_soc_card *card,
}
static int tegra30_soc_set_bias_level_post(struct snd_soc_card *card,
+ struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
struct tegra_max98095 *machine = snd_soc_card_get_drvdata(card);
@@ -654,13 +660,22 @@ static __devinit int tegra_max98095_driver_probe(struct platform_device *pdev)
goto err_switch_unregister;
}
+ if (!card->instantiated) {
+ ret = -ENODEV;
+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
+ ret);
+ goto err_unregister_card;
+ }
+
return 0;
+err_unregister_card:
+ snd_soc_unregister_card(card);
err_switch_unregister:
#ifdef CONFIG_SWITCH
switch_dev_unregister(&wired_switch_dev);
-#endif
err_fini_utils:
+#endif
tegra_asoc_utils_fini(&machine->util_data);
err_free_machine:
kfree(machine);