ASoC: davinci-mcasp: correct tdm_slots limit

The current check for the number of tdm-slots specified by platform data is
always true (x >= 2 || x <= 32); therefore the else branch that warns of an
incorrect number of slots can never be taken.

Check that the number of tdm slots specified by platform data is between 2
and 32, inclusive.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by Ben Gardiner and committed by Mark Brown 049cfaaa b3c27b51

+2 -2
+2 -2
sound/soc/davinci/davinci-mcasp.c
··· 644 644 mcasp_set_reg(dev->base + DAVINCI_MCASP_TXTDM_REG, mask); 645 645 mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXORD); 646 646 647 - if ((dev->tdm_slots >= 2) || (dev->tdm_slots <= 32)) 647 + if ((dev->tdm_slots >= 2) && (dev->tdm_slots <= 32)) 648 648 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, 649 649 FSXMOD(dev->tdm_slots), FSXMOD(0x1FF)); 650 650 else ··· 660 660 AHCLKRE); 661 661 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXTDM_REG, mask); 662 662 663 - if ((dev->tdm_slots >= 2) || (dev->tdm_slots <= 32)) 663 + if ((dev->tdm_slots >= 2) && (dev->tdm_slots <= 32)) 664 664 mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, 665 665 FSRMOD(dev->tdm_slots), FSRMOD(0x1FF)); 666 666 else