* 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.
@ 2008-12-31 22:39 sware
2009-01-01 11:29 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: sware @ 2008-12-31 22:39 UTC (permalink / raw)
To: ALSA project mailing list, stephen.ware
Cc: Takashi Iwai, Mark Brown, Dennis O'Brien
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: 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.
2008-12-31 22:39 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 sware
@ 2009-01-01 11:29 ` Mark Brown
2009-01-01 17:29 ` sware
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2009-01-01 11:29 UTC (permalink / raw)
To: sware
Cc: Takashi Iwai, stephen.ware, ALSA project mailing list,
Dennis O'Brien
On Wed, Dec 31, 2008 at 02:39:23PM -0800, sware wrote:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 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.
2009-01-01 11:29 ` Mark Brown
@ 2009-01-01 17:29 ` sware
0 siblings, 0 replies; 3+ messages in thread
From: sware @ 2009-01-01 17:29 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, ALSA project mailing list, Dennis O'Brien
Thanks, everyone. Especially Mark for pointing the way to a proper git
patch.
-stephen
Mark Brown wrote:
> On Wed, Dec 31, 2008 at 02:39:23PM -0800, sware wrote:
>
>> 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>
>>
>
> Applied, thanks.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-01 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-31 22:39 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 sware
2009-01-01 11:29 ` Mark Brown
2009-01-01 17:29 ` sware
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.