sound: oss/sb_audio: use swap() in sb_audio_close()
authorFabian Frederick <fabf@skynet.be>
Fri, 12 Jun 2015 16:59:08 +0000 (18:59 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 12 Jun 2015 18:46:29 +0000 (20:46 +0200)
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>
sound/oss/sb_audio.c

index 048439a..dc91072 100644 (file)
@@ -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;