ASoC: wm_adsp: Don't export wm_adsp2_lock
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 19 Mar 2019 11:52:08 +0000 (11:52 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 19 Mar 2019 12:39:43 +0000 (12:39 +0000)
This function is not presently called from outside the adsp code and nor
should it be, as such stop exporting it.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.h

index 5608ed5deccace2a64b9e3726da7ffda03b4f1ec..a9542a56b19e4ed3b956b9008a81152714c19eca 100644 (file)
@@ -2622,6 +2622,36 @@ static int wm_adsp2_ena(struct wm_adsp *dsp)
        return 0;
 }
 
+static int wm_adsp2_lock(struct wm_adsp *dsp, unsigned int lock_regions)
+{
+       struct regmap *regmap = dsp->regmap;
+       unsigned int code0, code1, lock_reg;
+
+       if (!(lock_regions & WM_ADSP2_REGION_ALL))
+               return 0;
+
+       lock_regions &= WM_ADSP2_REGION_ALL;
+       lock_reg = dsp->base + ADSP2_LOCK_REGION_1_LOCK_REGION_0;
+
+       while (lock_regions) {
+               code0 = code1 = 0;
+               if (lock_regions & BIT(0)) {
+                       code0 = ADSP2_LOCK_CODE_0;
+                       code1 = ADSP2_LOCK_CODE_1;
+               }
+               if (lock_regions & BIT(1)) {
+                       code0 |= ADSP2_LOCK_CODE_0 << ADSP2_LOCK_REGION_SHIFT;
+                       code1 |= ADSP2_LOCK_CODE_1 << ADSP2_LOCK_REGION_SHIFT;
+               }
+               regmap_write(regmap, lock_reg, code0);
+               regmap_write(regmap, lock_reg, code1);
+               lock_regions >>= 2;
+               lock_reg += 2;
+       }
+
+       return 0;
+}
+
 static void wm_adsp2_boot_work(struct work_struct *work)
 {
        struct wm_adsp *dsp = container_of(work,
@@ -3890,37 +3920,6 @@ int wm_adsp_compr_copy(struct snd_compr_stream *stream, char __user *buf,
 }
 EXPORT_SYMBOL_GPL(wm_adsp_compr_copy);
 
-int wm_adsp2_lock(struct wm_adsp *dsp, unsigned int lock_regions)
-{
-       struct regmap *regmap = dsp->regmap;
-       unsigned int code0, code1, lock_reg;
-
-       if (!(lock_regions & WM_ADSP2_REGION_ALL))
-               return 0;
-
-       lock_regions &= WM_ADSP2_REGION_ALL;
-       lock_reg = dsp->base + ADSP2_LOCK_REGION_1_LOCK_REGION_0;
-
-       while (lock_regions) {
-               code0 = code1 = 0;
-               if (lock_regions & BIT(0)) {
-                       code0 = ADSP2_LOCK_CODE_0;
-                       code1 = ADSP2_LOCK_CODE_1;
-               }
-               if (lock_regions & BIT(1)) {
-                       code0 |= ADSP2_LOCK_CODE_0 << ADSP2_LOCK_REGION_SHIFT;
-                       code1 |= ADSP2_LOCK_CODE_1 << ADSP2_LOCK_REGION_SHIFT;
-               }
-               regmap_write(regmap, lock_reg, code0);
-               regmap_write(regmap, lock_reg, code1);
-               lock_regions >>= 2;
-               lock_reg += 2;
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(wm_adsp2_lock);
-
 static void wm_adsp_fatal_error(struct wm_adsp *dsp)
 {
        struct wm_adsp_compr *compr;
index 8f09b4419a914ae773558c6175529b1acebf9a82..65ccf120dd5bc6af12ca918eaeabe2f3e8228883 100644 (file)
@@ -141,7 +141,6 @@ int wm_adsp2_early_event(struct snd_soc_dapm_widget *w,
                         struct snd_kcontrol *kcontrol, int event,
                         unsigned int freq);
 
-int wm_adsp2_lock(struct wm_adsp *adsp, unsigned int regions);
 irqreturn_t wm_adsp2_bus_error(struct wm_adsp *adsp);
 
 int wm_adsp2_event(struct snd_soc_dapm_widget *w,