[alsa-devel] [PATCH 36/42] ASoC: wm8990: Don't use range container for TLV with one entry

Lars-Peter Clausen lars at metafoo.de
Sun Aug 2 17:20:04 CEST 2015


For TLVs with only a single entry it is not necessary to use a range
container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of
TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 sound/soc/codecs/wm8990.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 83d72d8..23ecd30 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -418,10 +418,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 }
 
 /* INMIX dB values */
-static const unsigned int in_mix_tlv[] = {
-	TLV_DB_RANGE_HEAD(1),
-	0, 7, TLV_DB_SCALE_ITEM(-1200, 600, 0),
-};
+static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);
 
 /* Left In PGA Connections */
 static const struct snd_kcontrol_new wm8990_dapm_lin12_pga_controls[] = {
-- 
2.1.4



More information about the Alsa-devel mailing list