tegra-alt: adsp: fix crash in apm_get/apm_put

Change merged from Kernel 3.10 is not
compatible with Kernel 3.18.

Make changes as per kernel 3.18 to fix the
crash.

Bug 1653770

Change-Id: I8b9e416f9dd4a905a465f6bd06732a2ec782995a
Signed-off-by: Uday Gupta <udayg@nvidia.com>
Reviewed-on: http://git-master/r/755197
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Tested-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
This commit is contained in:
Uday Gupta
2015-06-09 11:51:36 -07:00
committed by Sameer Pujar
parent 0b3f6dae2b
commit 4aff5a0e14

View File

@@ -2413,8 +2413,8 @@ static int tegra210_adsp_apm_get(struct snd_kcontrol *kcontrol,
{ {
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol); struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
struct tegra210_adsp *adsp = snd_soc_platform_get_drvdata(platform); struct tegra210_adsp *adsp = snd_soc_component_get_drvdata(cmpnt);
struct tegra210_adsp_app *app = &adsp->apps[mc->reg]; struct tegra210_adsp_app *app = &adsp->apps[mc->reg];
ucontrol->value.integer.value[0] = app->priority; ucontrol->value.integer.value[0] = app->priority;
@@ -2426,8 +2426,8 @@ static int tegra210_adsp_apm_put(struct snd_kcontrol *kcontrol,
{ {
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol); struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
struct tegra210_adsp *adsp = snd_soc_platform_get_drvdata(platform); struct tegra210_adsp *adsp = snd_soc_component_get_drvdata(cmpnt);
struct tegra210_adsp_app *app = &adsp->apps[mc->reg]; struct tegra210_adsp_app *app = &adsp->apps[mc->reg];
apm_msg_t apm_msg; apm_msg_t apm_msg;
int ret = 0; int ret = 0;