Jorge Eduardo Candelaria <[email protected]> writes:
> 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 <[email protected]>
> ---
> arch/arm/mach-omap2/mcbsp.c | 12 ++++--------
> arch/arm/plat-omap/mcbsp.c | 20 ++++++++++++--------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
[...]
> diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
> index e1d0440..6e9660d 100644
> --- a/arch/arm/plat-omap/mcbsp.c
> +++ b/arch/arm/plat-omap/mcbsp.c
> @@ -724,14 +724,17 @@ int omap_mcbsp_request(unsigned int id)
> goto err_clk_disable;
> }
>
> - init_completion(&mcbsp->rx_irq_completion);
> - err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler,
> + if (!cpu_is_omap44xx) {
Instead of cpu_is* here, just use 'if (mcbsp->rx_irq)' which will
be more portable in other cases of no RX IRQ.
> + init_completion(&mcbsp->rx_irq_completion);
> + err = request_irq(mcbsp->rx_irq,
> + omap_mcbsp_rx_irq_handler,
> 0, "McBSP", (void *)mcbsp);
> - if (err != 0) {
> - dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
> - "for McBSP%d\n", mcbsp->rx_irq,
> - mcbsp->id);
> - goto err_free_irq;
> + if (err != 0) {
> + dev_err(mcbsp->dev, "Unable to request RX IRQ
> %d "
> + "for McBSP%d\n", mcbsp->rx_irq,
> + mcbsp->id);
> + goto err_free_irq;
> + }
> }
> }
>
> @@ -781,7 +784,8 @@ void omap_mcbsp_free(unsigned int id)
>
> if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
> /* Free IRQs */
> - free_irq(mcbsp->rx_irq, (void *)mcbsp);
> + if (!cpu_is_omap44xx())
here too
> + free_irq(mcbsp->rx_irq, (void *)mcbsp);
> free_irq(mcbsp->tx_irq, (void *)mcbsp);
> }
>
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html