diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-11-20 09:12:26 -0500 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2011-11-20 09:46:50 -0500 |
commit | 740fb9d512d91b1d6192ea13c109efa05b101424 (patch) | |
tree | 33ef92d1763c1dbd0d3fa3a51fa4dce991aecd21 /sound/soc | |
parent | a19ea0b8ec1f6892bf18f461d5023c9299e1417b (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/soc')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 2 |
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); | |||
365 | 365 | ||
366 | /* tlv for mic gain, 0db 20db 30db 40db */ | 366 | /* tlv for mic gain, 0db 20db 30db 40db */ |
367 | static const unsigned int mic_gain_tlv[] = { | 367 | static const unsigned int mic_gain_tlv[] = { |
368 | TLV_DB_RANGE_HEAD(4), | 368 | TLV_DB_RANGE_HEAD(2), |
369 | 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), | 369 | 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), |
370 | 1, 3, TLV_DB_SCALE_ITEM(2000, 1000, 0), | 370 | 1, 3, TLV_DB_SCALE_ITEM(2000, 1000, 0), |
371 | }; | 371 | }; |