瀏覽代碼

ALSA: aaci - Clean up duplicate code

Now snd_ac97_pcm_open() is called with the exactly same arguments
for both playback and capture directions.  Remove the unneeded check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 15 年之前
父節點
當前提交
cf5bd652c3
共有 1 個文件被更改,包括 3 次插入9 次删除
  1. 3 9
      sound/arm/aaci.c

+ 3 - 9
sound/arm/aaci.c

@@ -511,15 +511,9 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
 	if (err < 0)
 		goto out;
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
-					params_channels(params),
-					aacirun->pcm->r[0].slots);
-	else
-		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
-					params_channels(params),
-					aacirun->pcm->r[0].slots);
-
+	err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
+				params_channels(params),
+				aacirun->pcm->r[0].slots);
 	if (err)
 		goto out;