mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: Fabian Frederick <fabf@skynet.be> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1b12e4cac9
commit
7857230f79
1 changed files with 2 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue