Commit eba575c3 authored by Troy Kisky's avatar Troy Kisky Committed by Mark Brown

ASoC: DaVinci: i2s cleanup

Move variable declaration closer to use.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f9af37cc
...@@ -138,7 +138,6 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, ...@@ -138,7 +138,6 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev,
struct snd_soc_platform *platform = socdev->card->platform; struct snd_soc_platform *platform = socdev->card->platform;
int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
u32 spcr; u32 spcr;
int ret;
u32 mask = playback ? DAVINCI_MCBSP_SPCR_XRST : DAVINCI_MCBSP_SPCR_RRST; u32 mask = playback ? DAVINCI_MCBSP_SPCR_XRST : DAVINCI_MCBSP_SPCR_RRST;
spcr = davinci_mcbsp_read_reg(dev, DAVINCI_MCBSP_SPCR_REG); spcr = davinci_mcbsp_read_reg(dev, DAVINCI_MCBSP_SPCR_REG);
if (spcr & mask) { if (spcr & mask) {
...@@ -155,7 +154,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, ...@@ -155,7 +154,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev,
/* Stop the DMA to avoid data loss */ /* Stop the DMA to avoid data loss */
/* while the transmitter is out of reset to handle XSYNCERR */ /* while the transmitter is out of reset to handle XSYNCERR */
if (platform->pcm_ops->trigger) { if (platform->pcm_ops->trigger) {
ret = platform->pcm_ops->trigger(substream, int ret = platform->pcm_ops->trigger(substream,
SNDRV_PCM_TRIGGER_STOP); SNDRV_PCM_TRIGGER_STOP);
if (ret < 0) if (ret < 0)
printk(KERN_DEBUG "Playback DMA stop failed\n"); printk(KERN_DEBUG "Playback DMA stop failed\n");
...@@ -177,7 +176,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev, ...@@ -177,7 +176,7 @@ static void davinci_mcbsp_start(struct davinci_mcbsp_dev *dev,
/* Restart the DMA */ /* Restart the DMA */
if (platform->pcm_ops->trigger) { if (platform->pcm_ops->trigger) {
ret = platform->pcm_ops->trigger(substream, int ret = platform->pcm_ops->trigger(substream,
SNDRV_PCM_TRIGGER_START); SNDRV_PCM_TRIGGER_START);
if (ret < 0) if (ret < 0)
printk(KERN_DEBUG "Playback DMA start failed\n"); printk(KERN_DEBUG "Playback DMA start failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment