Commit 7857230f authored by Fabian Frederick's avatar Fabian Frederick Committed by Takashi Iwai

sound: oss/sb_audio: use swap() in sb_audio_close()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1b12e4ca
...@@ -102,12 +102,8 @@ void sb_audio_close(int dev) ...@@ -102,12 +102,8 @@ void sb_audio_close(int dev)
if(devc->duplex if(devc->duplex
&& !devc->fullduplex && !devc->fullduplex
&& (devc->opened & OPEN_READ) && (devc->opened & OPEN_WRITE)) && (devc->opened & OPEN_READ) && (devc->opened & OPEN_WRITE))
{ swap(audio_devs[dev]->dmap_out, audio_devs[dev]->dmap_in);
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;
}
audio_devs[dev]->dmap_out->dma = devc->dma8; audio_devs[dev]->dmap_out->dma = devc->dma8;
audio_devs[dev]->dmap_in->dma = ( devc->duplex ) ? audio_devs[dev]->dmap_in->dma = ( devc->duplex ) ?
devc->dma16 : devc->dma8; devc->dma16 : devc->dma8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment