Title: [7679] trunk/sound/soc/blackfin: clean-up, fix if condition logic
- Revision
- 7679
- Author
- bhsong
- Date
- 2009-10-20 00:58:07 -0400 (Tue, 20 Oct 2009)
Log Message
clean-up, fix if condition logic
Modified Paths
Diff
Modified: trunk/sound/soc/blackfin/bf5xx-i2s-pcm.c (7678 => 7679)
--- trunk/sound/soc/blackfin/bf5xx-i2s-pcm.c 2009-10-20 04:48:47 UTC (rev 7678)
+++ trunk/sound/soc/blackfin/bf5xx-i2s-pcm.c 2009-10-20 04:58:07 UTC (rev 7679)
@@ -157,10 +157,6 @@
int ret;
pr_debug("%s enter\n", __func__);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- sport_handle->tx_buf = buf->area;
- else
- sport_handle->rx_buf = buf->area;
snd_soc_set_runtime_hwparams(substream, &bf5xx_pcm_hardware);
@@ -169,9 +165,14 @@
if (ret < 0)
goto out;
- if (sport_handle != NULL)
+ if (sport_handle != NULL) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ sport_handle->tx_buf = buf->area;
+ else
+ sport_handle->rx_buf = buf->area;
+
runtime->private_data = sport_handle;
- else {
+ } else {
pr_err("sport_handle is NULL\n");
return -1;
}
Modified: trunk/sound/soc/blackfin/bf5xx-tdm-pcm.c (7678 => 7679)
--- trunk/sound/soc/blackfin/bf5xx-tdm-pcm.c 2009-10-20 04:48:47 UTC (rev 7678)
+++ trunk/sound/soc/blackfin/bf5xx-tdm-pcm.c 2009-10-20 04:58:07 UTC (rev 7679)
@@ -162,11 +162,6 @@
int ret = 0;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- sport_handle->tx_buf = buf->area;
- else
- sport_handle->rx_buf = buf->area;
-
snd_soc_set_runtime_hwparams(substream, &bf5xx_pcm_hardware);
ret = snd_pcm_hw_constraint_integer(runtime,
@@ -174,9 +169,14 @@
if (ret < 0)
goto out;
- if (sport_handle != NULL)
+ if (sport_handle != NULL) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ sport_handle->tx_buf = buf->area;
+ else
+ sport_handle->rx_buf = buf->area;
+
runtime->private_data = sport_handle;
- else {
+ } else {
pr_err("sport_handle is NULL\n");
ret = -ENODEV;
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits