Skip to content

Commit

Permalink
ALSA: aaci - Clean up duplicate code
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tiwai committed Dec 1, 2009
1 parent e0feefc commit cf5bd65
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions sound/arm/aaci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cf5bd65

Please sign in to comment.