diff options
Diffstat (limited to 'arch/arm/plat-omap/mcbsp.c')
-rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 20 |
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 | ||