aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mcbsp.c
diff options
context:
space:
mode:
authorJorge Eduardo Candelaria <jorge.candelaria@ti.com>2010-05-12 13:18:39 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-05-14 06:20:01 -0400
commit9319b9da35179e11aa9c15d80062d63b36a0517f (patch)
tree8a793fe818a70e45e592c915e85e92554f998e5f /arch/arm/plat-omap/mcbsp.c
parentd98508a121e8f4b1ccf876fea463fa0afddc4e19 (diff)
ARM: McBSP: Fix request for irq in OMAP4
In OMAP4, there is only one irq line for TX and RX paths. Use the correct irq line to avoid errors at runtime. Also, request irq line only once (instead of requesting for TX and RX). Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'arch/arm/plat-omap/mcbsp.c')
-rw-r--r--arch/arm/plat-omap/mcbsp.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 4ff7a11b1838..8bbbb93e2128 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -778,14 +778,17 @@ int omap_mcbsp_request(unsigned int id)
778 goto err_clk_disable; 778 goto err_clk_disable;
779 } 779 }
780 780
781 init_completion(&mcbsp->rx_irq_completion); 781 if (mcbsp->rx_irq) {
782 err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler, 782 init_completion(&mcbsp->rx_irq_completion);
783 err = request_irq(mcbsp->rx_irq,
784 omap_mcbsp_rx_irq_handler,
783 0, "McBSP", (void *)mcbsp); 785 0, "McBSP", (void *)mcbsp);
784 if (err != 0) { 786 if (err != 0) {
785 dev_err(mcbsp->dev, "Unable to request RX IRQ %d " 787 dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
786 "for McBSP%d\n", mcbsp->rx_irq, 788 "for McBSP%d\n", mcbsp->rx_irq,
787 mcbsp->id); 789 mcbsp->id);
788 goto err_free_irq; 790 goto err_free_irq;
791 }
789 } 792 }
790 } 793 }
791 794
@@ -835,7 +838,8 @@ void omap_mcbsp_free(unsigned int id)
835 838
836 if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { 839 if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
837 /* Free IRQs */ 840 /* Free IRQs */
838 free_irq(mcbsp->rx_irq, (void *)mcbsp); 841 if (mcbsp->rx_irq)
842 free_irq(mcbsp->rx_irq, (void *)mcbsp);
839 free_irq(mcbsp->tx_irq, (void *)mcbsp); 843 free_irq(mcbsp->tx_irq, (void *)mcbsp);
840 } 844 }
841 845