summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2009-06-05 19:15:58 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-06 09:24:48 +0100
commitccff4b15e0847223de0a481f5b7fa5ef902cf3bd (patch)
treee4508becdb1789cca063b86f1de0ecfa17369397
parente3509ff0fb9df53e45cd68488e3b463a80455db7 (diff)
downloadop-kernel-dev-ccff4b15e0847223de0a481f5b7fa5ef902cf3bd.zip
op-kernel-dev-ccff4b15e0847223de0a481f5b7fa5ef902cf3bd.tar.gz
ASoC: codec tlv320aic23 fix bogus divide by 0 message
Some code analyzer software mistakenly gives divide by 0 error messages for these lines. This patch will end its confusion. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/tlv320aic23.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 9fcbb9c..0b8dcb5 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -273,14 +273,14 @@ static const unsigned short sr_valid_mask[] = {
* Every divisor is a factor of 11*12
*/
#define SR_MULT (11*12)
-#define A(x) (x) ? (SR_MULT/x) : 0
+#define A(x) (SR_MULT/x)
static const unsigned char sr_adc_mult_table[] = {
- A(2), A(2), A(12), A(12), A(0), A(0), A(3), A(1),
- A(2), A(2), A(11), A(11), A(0), A(0), A(0), A(1)
+ A(2), A(2), A(12), A(12), 0, 0, A(3), A(1),
+ A(2), A(2), A(11), A(11), 0, 0, 0, A(1)
};
static const unsigned char sr_dac_mult_table[] = {
- A(2), A(12), A(2), A(12), A(0), A(0), A(3), A(1),
- A(2), A(11), A(2), A(11), A(0), A(0), A(0), A(1)
+ A(2), A(12), A(2), A(12), 0, 0, A(3), A(1),
+ A(2), A(11), A(2), A(11), 0, 0, 0, A(1)
};
static unsigned get_score(int adc, int adc_l, int adc_h, int need_adc,
OpenPOWER on IntegriCloud