summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-11-20 15:12:26 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2013-01-21 10:49:46 +0100
commit97da9073e5156c6ff7eef245081da6d8cf15d27f (patch)
tree5948c638704d821decc859802dedec6494c8bb76 /sound
parent75e85405d2b95532c9f3eba34de15c9d257da1b7 (diff)
ASoC: sgtl5000: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d15695d1c273..bbcf921166f7 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -365,7 +365,7 @@ static const DECLARE_TLV_DB_SCALE(capture_6db_attenuate, -600, 600, 0);
/* tlv for mic gain, 0db 20db 30db 40db */
static const unsigned int mic_gain_tlv[] = {
- TLV_DB_RANGE_HEAD(4),
+ TLV_DB_RANGE_HEAD(2),
0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
1, 3, TLV_DB_SCALE_ITEM(2000, 1000, 0),
};