summaryrefslogtreecommitdiffstats
path: root/sound/soc/kirkwood/kirkwood-i2s.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-06-26 16:22:55 +0200
committerMark Brown <broonie@linaro.org>2014-06-28 14:18:17 +0200
commit52b896cfef00289b5966b9b0e22b865511238216 (patch)
tree3f43d291edfe104dce4afd24c567c08d6a8b890c /sound/soc/kirkwood/kirkwood-i2s.c
parentLinux 3.16-rc1 (diff)
downloadlinux-52b896cfef00289b5966b9b0e22b865511238216.tar.xz
linux-52b896cfef00289b5966b9b0e22b865511238216.zip
ASoC: kirkwood-i2s: provide helper KIRKWOOD_RECCTL_ENABLE_MASK definition
Add a KIRKWOOD_RECCTL_ENABLE_MASK definition to complement the existing PLAYCTL definition, and make use of it where we wish to clear both enable bits. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 9f842222e798..55af6c8e4603 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -322,8 +322,7 @@ static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream,
else
ctl &= ~KIRKWOOD_RECCTL_I2S_EN; /* spdif */
- value = ctl & ~(KIRKWOOD_RECCTL_I2S_EN |
- KIRKWOOD_RECCTL_SPDIF_EN);
+ value = ctl & ~KIRKWOOD_RECCTL_ENABLE_MASK;
writel(value, priv->io + KIRKWOOD_RECCTL);
/* enable interrupts */
@@ -347,7 +346,7 @@ static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream,
/* disable all records */
value = readl(priv->io + KIRKWOOD_RECCTL);
- value &= ~(KIRKWOOD_RECCTL_I2S_EN | KIRKWOOD_RECCTL_SPDIF_EN);
+ value &= ~KIRKWOOD_RECCTL_ENABLE_MASK;
writel(value, priv->io + KIRKWOOD_RECCTL);
break;
@@ -411,7 +410,7 @@ static int kirkwood_i2s_init(struct kirkwood_dma_data *priv)
writel(value, priv->io + KIRKWOOD_PLAYCTL);
value = readl(priv->io + KIRKWOOD_RECCTL);
- value &= ~(KIRKWOOD_RECCTL_I2S_EN | KIRKWOOD_RECCTL_SPDIF_EN);
+ value &= ~KIRKWOOD_RECCTL_ENABLE_MASK;
writel(value, priv->io + KIRKWOOD_RECCTL);
return 0;