Skip to content

Commit

Permalink
sound: oss/sb_audio: use swap() in sb_audio_close()
Browse files Browse the repository at this point in the history
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Fabian Frederick authored and tiwai committed Jun 12, 2015
1 parent 1b12e4c commit 7857230
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sound/oss/sb_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,8 @@ void sb_audio_close(int dev)
if(devc->duplex
&& !devc->fullduplex
&& (devc->opened & OPEN_READ) && (devc->opened & OPEN_WRITE))
{
struct dma_buffparms *dmap_temp;
dmap_temp = audio_devs[dev]->dmap_out;
audio_devs[dev]->dmap_out = audio_devs[dev]->dmap_in;
audio_devs[dev]->dmap_in = dmap_temp;
}
swap(audio_devs[dev]->dmap_out, audio_devs[dev]->dmap_in);

audio_devs[dev]->dmap_out->dma = devc->dma8;
audio_devs[dev]->dmap_in->dma = ( devc->duplex ) ?
devc->dma16 : devc->dma8;
Expand Down

0 comments on commit 7857230

Please sign in to comment.