summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-18 17:48:37 +0000
committerTakashi Iwai <tiwai@suse.de>2009-12-18 20:29:09 +0100
commit4e30b69108b20eca80f1a323f969bf7629c7795f (patch)
tree729c34d2d5f025e310752dc3711a60d1bcb9e603 /sound
parent6ca867c827c84d21316e9dc4035abe9480f8347c (diff)
downloadlinux-3.10-4e30b69108b20eca80f1a323f969bf7629c7795f.tar.gz
linux-3.10-4e30b69108b20eca80f1a323f969bf7629c7795f.tar.bz2
linux-3.10-4e30b69108b20eca80f1a323f969bf7629c7795f.zip
ALSA: AACI: cleanup aaci_pcm_hw_params
Since the recording and playback paths are now the same, eliminate the needless conditionals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/arm/aaci.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index ea3be874c84..2e28748a3d8 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -438,18 +438,14 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
err = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(params));
- if (err < 0)
- goto out;
-
- err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
- params_channels(params),
- aacirun->pcm->r[0].slots);
- if (err)
- goto out;
+ if (err >= 0) {
+ err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
+ params_channels(params),
+ aacirun->pcm->r[0].slots);
- aacirun->pcm_open = 1;
+ aacirun->pcm_open = err == 0;
+ }
- out:
return err;
}
@@ -458,7 +454,7 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct aaci_runtime *aacirun = runtime->private_data;
- aacirun->start = (void *)runtime->dma_area;
+ aacirun->start = runtime->dma_area;
aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream);
aacirun->ptr = aacirun->start;
aacirun->period =