Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ee04296 authored by Karthikeyan Mani's avatar Karthikeyan Mani
Browse files

ASoC: msm: Add support for multiple module unload and load



Check for gpio pin validity before calling
gpio_free. deregister audio notifier so that
while unloading and loading module again, the
old client of notifier is removed cleanly and
new one is added.

CRs-fixed: 2039099
Change-Id: I9a05c5705695d29601d65d1b9cc086515ac480f0
Signed-off-by: default avatarKarthikeyan Mani <kmani@codeaurora.org>
parent a25de292
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -7266,10 +7266,12 @@ static int msm_asoc_machine_remove(struct platform_device *pdev)
	struct msm_asoc_mach_data *pdata =
	struct msm_asoc_mach_data *pdata =
				snd_soc_card_get_drvdata(card);
				snd_soc_card_get_drvdata(card);


	if (gpio_is_valid(pdata->us_euro_gpio))
		gpio_free(pdata->us_euro_gpio);
		gpio_free(pdata->us_euro_gpio);
	i2s_auxpcm_deinit();
	i2s_auxpcm_deinit();


	snd_soc_unregister_card(card);
	snd_soc_unregister_card(card);
	audio_notifier_deregister("msm8998");
	return 0;
	return 0;
}
}