]> www.infradead.org Git - users/willy/xarray.git/commitdiff
ASoC: improve macro definition on TWL4030_OUTPUT_PGA
authorHongbo Li <lihongbo22@huawei.com>
Wed, 21 Aug 2024 07:08:11 +0000 (15:08 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 29 Sep 2024 23:09:51 +0000 (01:09 +0200)
The @mask is not used in TWL4030_OUTPUT_PGA, so we can remove
it and simplify its usage.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240821070815.2326534-2-lihongbo22@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/twl4030.c

index 9c50ac356c8955d5c3d37102a9e0630bd36fad48..e3782762139f6aee59b9bf6ef623dcf946f2bf80 100644 (file)
@@ -555,7 +555,7 @@ static const struct snd_kcontrol_new twl4030_dapm_dbypassv_control =
  * On unmute: restore the register content from the reg_cache
  * Outputs handled in this way:  Earpiece, PreDrivL/R, CarkitL/R
  */
-#define TWL4030_OUTPUT_PGA(pin_name, reg, mask)                                \
+#define TWL4030_OUTPUT_PGA(pin_name, reg)                              \
 static int pin_name##pga_event(struct snd_soc_dapm_widget *w,          \
                               struct snd_kcontrol *kcontrol, int event) \
 {                                                                      \
@@ -575,11 +575,11 @@ static int pin_name##pga_event(struct snd_soc_dapm_widget *w,             \
        return 0;                                                       \
 }
 
-TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL, TWL4030_EAR_GAIN);
-TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL, TWL4030_PREDL_GAIN);
-TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL, TWL4030_PREDR_GAIN);
-TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL, TWL4030_PRECKL_GAIN);
-TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL, TWL4030_PRECKR_GAIN);
+TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL);
+TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL);
+TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL);
+TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL);
+TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL);
 
 static void handsfree_ramp(struct snd_soc_component *component, int reg, int ramp)
 {