From: Kevin Hilman <khilman@deeprootsystems.com>
To: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: McBSP: Fix request for irq in OMAP4
Date: Wed, 05 May 2010 14:16:52 -0700 [thread overview]
Message-ID: <87zl0e3v7f.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1273016270-31452-2-git-send-email-jorge.candelaria@ti.com> (Jorge Eduardo Candelaria's message of "Tue\, 4 May 2010 18\:37\:49 -0500")
Jorge Eduardo Candelaria <jorge.candelaria@ti.com> 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 <jorge.candelaria@ti.com>
> ---
> 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
prev parent reply other threads:[~2010-05-05 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 23:37 [PATCH 0/0] McBSP changes for OMAP4 platform Jorge Eduardo Candelaria
2010-05-04 23:37 ` [PATCH 1/2] ARM: McBSP: Fix request for irq in OMAP4 Jorge Eduardo Candelaria
2010-05-04 23:37 ` [PATCH 2/2] ARM: OMAP4: Add support for omap4 in McBSP driver Jorge Eduardo Candelaria
2010-05-05 3:02 ` [PATCH 1/2] ARM: McBSP: Fix request for irq in OMAP4 G, Manjunath Kondaiah
2010-05-05 10:39 ` Jarkko Nikula
2010-05-06 0:58 ` Candelaria Villarreal, Jorge
2010-05-05 10:29 ` Jarkko Nikula
2010-05-05 11:11 ` Shilimkar, Santosh
2010-05-05 21:16 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zl0e3v7f.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=jorge.candelaria@ti.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.