* [PATCH 1/1 linux-next] sound: oss/sb_audio: use swap() in sb_audio_close()
@ 2015-06-12 16:59 Fabian Frederick
0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2015-06-12 16:59 UTC (permalink / raw)
To: linux-kernel
Cc: Julia Lawall, Fabian Frederick, Jaroslav Kysela, Takashi Iwai,
alsa-devel
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
sound/oss/sb_audio.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
index 048439a..dc91072 100644
--- a/sound/oss/sb_audio.c
+++ b/sound/oss/sb_audio.c
@@ -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;
--
2.4.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-12 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 16:59 [PATCH 1/1 linux-next] sound: oss/sb_audio: use swap() in sb_audio_close() Fabian Frederick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®