]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - sound/soc/codecs/wm_adsp.c
Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[mirror_ubuntu-jammy-kernel.git] / sound / soc / codecs / wm_adsp.c
index 66501b8dc46fb17e962f7bf1b69923da7bdae1a6..1dd291cebe67b78d53a48c549b2c7e5a399e75bc 100644 (file)
@@ -2419,7 +2419,7 @@ static int wm_adsp_create_name(struct wm_adsp *dsp)
        return 0;
 }
 
-int wm_adsp1_init(struct wm_adsp *dsp)
+static int wm_adsp_common_init(struct wm_adsp *dsp)
 {
        int ret;
 
@@ -2428,11 +2428,17 @@ int wm_adsp1_init(struct wm_adsp *dsp)
                return ret;
 
        INIT_LIST_HEAD(&dsp->alg_regions);
+       INIT_LIST_HEAD(&dsp->ctl_list);
 
        mutex_init(&dsp->pwr_lock);
 
        return 0;
 }
+
+int wm_adsp1_init(struct wm_adsp *dsp)
+{
+       return wm_adsp_common_init(dsp);
+}
 EXPORT_SYMBOL_GPL(wm_adsp1_init);
 
 int wm_adsp1_event(struct snd_soc_dapm_widget *w,
@@ -2917,7 +2923,7 @@ int wm_adsp2_init(struct wm_adsp *dsp)
 {
        int ret;
 
-       ret = wm_adsp_create_name(dsp);
+       ret = wm_adsp_common_init(dsp);
        if (ret)
                return ret;
 
@@ -2939,12 +2945,8 @@ int wm_adsp2_init(struct wm_adsp *dsp)
                break;
        }
 
-       INIT_LIST_HEAD(&dsp->alg_regions);
-       INIT_LIST_HEAD(&dsp->ctl_list);
        INIT_WORK(&dsp->boot_work, wm_adsp2_boot_work);
 
-       mutex_init(&dsp->pwr_lock);
-
        return 0;
 }
 EXPORT_SYMBOL_GPL(wm_adsp2_init);