summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShreshtha SAHU <ssahu@nvidia.com>2014-09-24 20:51:29 +0530
committerWinnie Hsu <whsu@nvidia.com>2014-10-01 18:58:37 -0700
commit23c12ca33e6851df34b2b3086d3a8841c2f1a0eb (patch)
tree0ddca25ad61aa2a62a1352c593f2c5b20f463b5d /sound
parent2efbea7430a572089f442d258834c7fd5e4e9b75 (diff)
soc: tegra: max98090: laguna: fix error return paths
- Remove switch_dev_unregister and call tegra_asoc_switch_unregister instead in error return path corresponding to tegra_asoc_switch_register. - Skip max97236 registration for laguna erss platorm. Issues surfaced out on making max98090 as removable KO module. Bug 1550880 Change-Id: I6a6c0185a3980efab3592f0733bda214aac4fc81 Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com> Reviewed-on: http://git-master/r/551901 Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_max98090.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c
index f18ab905f029..88ff101d0514 100644
--- a/sound/soc/tegra/tegra_max98090.c
+++ b/sound/soc/tegra/tegra_max98090.c
@@ -1289,7 +1289,8 @@ static int tegra_late_probe(struct snd_soc_card *card)
card->rtd[DAI_LINK_HIFI_MAX97236].codec;
int ret;
- if (of_machine_is_compatible("nvidia,norrin"))
+ if (of_machine_is_compatible("nvidia,norrin") ||
+ of_machine_is_compatible("nvidia,laguna"))
return 0;
if (of_device_is_compatible(np, "nvidia,max97236")) {
@@ -1570,8 +1571,17 @@ err_unregister_card:
snd_soc_unregister_card(card);
err_switch_unregister:
#ifdef CONFIG_SWITCH
- switch_dev_unregister(&tegra_max98090_headset_switch);
+ tegra_asoc_switch_unregister(&tegra_max98090_headset_switch);
#endif
+ if (machine->avdd_aud_reg) {
+ regulator_disable(machine->avdd_aud_reg);
+ regulator_put(machine->avdd_aud_reg);
+ }
+
+ if (machine->vdd_sw_1v8_reg) {
+ regulator_disable(machine->vdd_sw_1v8_reg);
+ regulator_put(machine->vdd_sw_1v8_reg);
+ }
err_fini_utils:
tegra_asoc_utils_fini(&machine->util_data);
err_free_machine:
@@ -1590,7 +1600,7 @@ static int __devexit tegra_max98090_driver_remove(struct platform_device *pdev)
struct tegra_asoc_platform_data *pdata = machine->pdata;
#ifdef CONFIG_SWITCH
- switch_dev_unregister(&tegra_max98090_headset_switch);
+ tegra_asoc_switch_unregister(&tegra_max98090_headset_switch);
#endif
if (machine->gpio_requested & GPIO_HP_MUTE)