* [PATCH] ASoC/mpc5200: remove duplicate identical IRQ handler
@ 2009-11-09 16:40 Grant Likely
2009-11-10 13:03 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Grant Likely @ 2009-11-09 16:40 UTC (permalink / raw)
To: linuxppc-dev, alsa-devel, broonie; +Cc: lrg
The TX and RX irq handlers are identical. Merge them
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
Hi Mark. Here's one more cleanup patch.
sound/soc/fsl/mpc5200_dma.c | 33 +++------------------------------
1 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index ee5a606..440b749 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -66,32 +66,7 @@ static void psc_dma_bcom_enqueue_next_buffer(struct psc_dma_stream *s)
}
/* Bestcomm DMA irq handler */
-static irqreturn_t psc_dma_bcom_irq_tx(int irq, void *_psc_dma_stream)
-{
- struct psc_dma_stream *s = _psc_dma_stream;
-
- spin_lock(&s->psc_dma->lock);
- /* For each finished period, dequeue the completed period buffer
- * and enqueue a new one in it's place. */
- while (bcom_buffer_done(s->bcom_task)) {
- bcom_retrieve_buffer(s->bcom_task, NULL, NULL);
-
- s->period_current = (s->period_current+1) % s->runtime->periods;
- s->period_count++;
-
- psc_dma_bcom_enqueue_next_buffer(s);
- }
- spin_unlock(&s->psc_dma->lock);
-
- /* If the stream is active, then also inform the PCM middle layer
- * of the period finished event. */
- if (s->active)
- snd_pcm_period_elapsed(s->stream);
-
- return IRQ_HANDLED;
-}
-
-static irqreturn_t psc_dma_bcom_irq_rx(int irq, void *_psc_dma_stream)
+static irqreturn_t psc_dma_bcom_irq(int irq, void *_psc_dma_stream)
{
struct psc_dma_stream *s = _psc_dma_stream;
@@ -486,11 +461,9 @@ int mpc5200_audio_dma_create(struct of_device *op)
rc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED,
"psc-dma-status", psc_dma);
- rc |= request_irq(psc_dma->capture.irq,
- &psc_dma_bcom_irq_rx, IRQF_SHARED,
+ rc |= request_irq(psc_dma->capture.irq, &psc_dma_bcom_irq, IRQF_SHARED,
"psc-dma-capture", &psc_dma->capture);
- rc |= request_irq(psc_dma->playback.irq,
- &psc_dma_bcom_irq_tx, IRQF_SHARED,
+ rc |= request_irq(psc_dma->playback.irq, &psc_dma_bcom_irq, IRQF_SHARED,
"psc-dma-playback", &psc_dma->playback);
if (rc) {
ret = -ENODEV;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC/mpc5200: remove duplicate identical IRQ handler
2009-11-09 16:40 [PATCH] ASoC/mpc5200: remove duplicate identical IRQ handler Grant Likely
@ 2009-11-10 13:03 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2009-11-10 13:03 UTC (permalink / raw)
To: Grant Likely; +Cc: alsa-devel, linuxppc-dev, lrg
On Mon, Nov 09, 2009 at 09:40:09AM -0700, Grant Likely wrote:
> The TX and RX irq handlers are identical. Merge them
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-10 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 16:40 [PATCH] ASoC/mpc5200: remove duplicate identical IRQ handler Grant Likely
2009-11-10 13:03 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).