diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-11-09 11:40:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-10 08:02:01 -0500 |
commit | a68cc8daebdd8ba7fe457ab4b2a0ccdf3cedc9f8 (patch) | |
tree | b0a6fbebc64bbda03619754c51ada3d205468ba1 /sound/soc/fsl/mpc5200_dma.c | |
parent | 68d019553b8cc4ddac7f861e23efbe48a1367490 (diff) |
ASoC: mpc5200: remove duplicate identical IRQ handler
The TX and RX irq handlers are identical. Merge them
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/mpc5200_dma.c')
-rw-r--r-- | 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 9c88e15ce693..30ed568afb2e 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) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | /* Bestcomm DMA irq handler */ | 68 | /* Bestcomm DMA irq handler */ |
69 | static irqreturn_t psc_dma_bcom_irq_tx(int irq, void *_psc_dma_stream) | 69 | static irqreturn_t psc_dma_bcom_irq(int irq, void *_psc_dma_stream) |
70 | { | ||
71 | struct psc_dma_stream *s = _psc_dma_stream; | ||
72 | |||
73 | spin_lock(&s->psc_dma->lock); | ||
74 | /* For each finished period, dequeue the completed period buffer | ||
75 | * and enqueue a new one in it's place. */ | ||
76 | while (bcom_buffer_done(s->bcom_task)) { | ||
77 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); | ||
78 | |||
79 | s->period_current = (s->period_current+1) % s->runtime->periods; | ||
80 | s->period_count++; | ||
81 | |||
82 | psc_dma_bcom_enqueue_next_buffer(s); | ||
83 | } | ||
84 | spin_unlock(&s->psc_dma->lock); | ||
85 | |||
86 | /* If the stream is active, then also inform the PCM middle layer | ||
87 | * of the period finished event. */ | ||
88 | if (s->active) | ||
89 | snd_pcm_period_elapsed(s->stream); | ||
90 | |||
91 | return IRQ_HANDLED; | ||
92 | } | ||
93 | |||
94 | static irqreturn_t psc_dma_bcom_irq_rx(int irq, void *_psc_dma_stream) | ||
95 | { | 70 | { |
96 | struct psc_dma_stream *s = _psc_dma_stream; | 71 | struct psc_dma_stream *s = _psc_dma_stream; |
97 | 72 | ||
@@ -486,11 +461,9 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
486 | 461 | ||
487 | rc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED, | 462 | rc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED, |
488 | "psc-dma-status", psc_dma); | 463 | "psc-dma-status", psc_dma); |
489 | rc |= request_irq(psc_dma->capture.irq, | 464 | rc |= request_irq(psc_dma->capture.irq, &psc_dma_bcom_irq, IRQF_SHARED, |
490 | &psc_dma_bcom_irq_rx, IRQF_SHARED, | ||
491 | "psc-dma-capture", &psc_dma->capture); | 465 | "psc-dma-capture", &psc_dma->capture); |
492 | rc |= request_irq(psc_dma->playback.irq, | 466 | rc |= request_irq(psc_dma->playback.irq, &psc_dma_bcom_irq, IRQF_SHARED, |
493 | &psc_dma_bcom_irq_tx, IRQF_SHARED, | ||
494 | "psc-dma-playback", &psc_dma->playback); | 467 | "psc-dma-playback", &psc_dma->playback); |
495 | if (rc) { | 468 | if (rc) { |
496 | ret = -ENODEV; | 469 | ret = -ENODEV; |