ASoC: wm_adsp: Fix Preload control name.

Set suffix to an empty string if it is NULL to avoid
adding (NULL) to the conroll name.

Change-Id: I61e2b93cbda10b6ba5300b652b6fb0f6c49057bf
Signed-off-by: vkarp <vkarp@motorola.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1193034
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
Vlad Karpovich 2018-06-13 14:35:43 -05:00 • committed by Ravikumar Vembu
commit ec13514954

View file

@ -3461,6 +3461,8 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol,
(struct soc_mixer_control *)kcontrol->private_value;
char preload[32];
if (!dsp->suffix)
dsp->suffix = "";
if (codec->component.name_prefix)
snprintf(preload, ARRAY_SIZE(preload), "%s DSP%u%s Preload",
codec->component.name_prefix, mc->shift, dsp->suffix);