From: sware <microcontrolfreak@gmail.com>
To: ALSA project mailing list <alsa-devel@alsa-project.org>,
stephen.ware@eqware.net
Cc: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@sirena.org.uk>,
Dennis O'Brien <dennis.obrien@eqware.net>
Subject: Subject: [PATCH 1/1] set invalid dma channel to -1 (and properly check for it) since 0 is not an invalid channel but -1 is.
Date: Wed, 31 Dec 2008 14:39:23 -0800 [thread overview]
Message-ID: <495BF49B.1000907@gmail.com> (raw)
Set the invalid dma channel to -1 (and check properly for it) in pxa2xx_pcm_hw_free().
Was assuming 0 is an invalid channel number but 0 is a valid pxa dma channel num.
Signed-off-by: stephen <stephen.ware@eqware.net>
---
sound/soc/pxa/pxa2xx-pcm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index c670d08..53b9fb1 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -61,9 +61,9 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
__pxa2xx_pcm_hw_free(substream);
- if (prtd->dma_ch) {
+ if (prtd->dma_ch >= 0) {
pxa_free_dma(prtd->dma_ch);
- prtd->dma_ch = 0;
+ prtd->dma_ch = -1;
}
return 0;
--
1.5.4.3
next reply other threads:[~2008-12-31 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-31 22:39 sware [this message]
2009-01-01 11:29 ` Subject: [PATCH 1/1] set invalid dma channel to -1 (and properly check for it) since 0 is not an invalid channel but -1 is Mark Brown
2009-01-01 17:29 ` sware
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=495BF49B.1000907@gmail.com \
--to=microcontrolfreak@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@sirena.org.uk \
--cc=dennis.obrien@eqware.net \
--cc=stephen.ware@eqware.net \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox