diff options
author | Weidong Wang <wangweidong.a@awinic.com> | 2023-09-28 13:57:22 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-09-28 14:38:33 +0300 |
commit | e83219c94abb4ad977f6b2b8be7d466ef0c2248f (patch) | |
tree | 31ed33471146e0b2b599352c45556b1c64e26815 /sound/soc/codecs/aw88395/aw88395.c | |
parent | 74ff4f22d81e97b5c2505cee2ff743fc9249d9e2 (diff) | |
download | linux-e83219c94abb4ad977f6b2b8be7d466ef0c2248f.tar.xz |
ASoC: codecs: Modify the transmission method of parameters
Change the transmission mode of the "aw88395_dev_get_prof_name"
function parameter, Instead of using return values for data
transfer, parameters are used
Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://lore.kernel.org/r/20230928105727.47273-6-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/aw88395/aw88395.c')
-rw-r--r-- | sound/soc/codecs/aw88395/aw88395.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c index 9dcd75dd799a..77227c8f01f6 100644 --- a/sound/soc/codecs/aw88395/aw88395.c +++ b/sound/soc/codecs/aw88395/aw88395.c @@ -175,9 +175,8 @@ static int aw88395_profile_info(struct snd_kcontrol *kcontrol, { struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); - const char *prof_name; - char *name; - int count; + char *prof_name, *name; + int count, ret; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -196,8 +195,8 @@ static int aw88395_profile_info(struct snd_kcontrol *kcontrol, name = uinfo->value.enumerated.name; count = uinfo->value.enumerated.item; - prof_name = aw88395_dev_get_prof_name(aw88395->aw_pa, count); - if (!prof_name) { + ret = aw88395_dev_get_prof_name(aw88395->aw_pa, count, &prof_name); + if (ret) { strscpy(uinfo->value.enumerated.name, "null", strlen("null") + 1); return 0; |