From: Laxman Dewangan <ldewangan@nvidia.com>
To: arm@kernel.org, djbw@fb.com, vinod.koul@intel.com
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
stable@kernel.org, Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH] dma: tegra: fix interrupt name issue with apb dma.
Date: Wed, 3 Oct 2012 22:51:53 +0530 [thread overview]
Message-ID: <1349284913-22350-1-git-send-email-ldewangan@nvidia.com> (raw)
When watching the interrupts through /proc/interrupts,
the name of the interrupts are blank or garbage. The
reason is the pointer passed for devname during irq
registration is stack and so it get changed after
dma registration completes.
Allocate the pointer as part of dma channel and pass
this pointer as the devname for irq registration to
avoid change of name.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
Resending as mail was not delivered to arm@kernel.org.
drivers/dma/tegra20-apb-dma.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 24a6512..528c62d 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -169,6 +169,7 @@ typedef void (*dma_isr_handler)(struct tegra_dma_channel *tdc,
/* tegra_dma_channel: Channel specific information */
struct tegra_dma_channel {
struct dma_chan dma_chan;
+ char name[30];
bool config_init;
int id;
int irq;
@@ -1282,7 +1283,6 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&tdma->dma_dev.channels);
for (i = 0; i < cdata->nr_channels; i++) {
struct tegra_dma_channel *tdc = &tdma->channels[i];
- char irq_name[30];
tdc->chan_base_offset = TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET +
i * TEGRA_APBDMA_CHANNEL_REGISTER_SIZE;
@@ -1294,9 +1294,9 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)
goto err_irq;
}
tdc->irq = res->start;
- snprintf(irq_name, sizeof(irq_name), "apbdma.%d", i);
+ snprintf(tdc->name, sizeof(tdc->name), "apbdma.%d", i);
ret = devm_request_irq(&pdev->dev, tdc->irq,
- tegra_dma_isr, 0, irq_name, tdc);
+ tegra_dma_isr, 0, tdc->name, tdc);
if (ret) {
dev_err(&pdev->dev,
"request_irq failed with err %d channel %d\n",
--
1.7.1.1
next reply other threads:[~2012-10-03 17:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 17:21 Laxman Dewangan [this message]
[not found] ` <1349284913-22350-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-10-03 20:53 ` [PATCH] dma: tegra: fix interrupt name issue with apb dma Stephen Warren
[not found] ` <506CA5D8.1050201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-10-04 8:16 ` Arnd Bergmann
2012-10-04 8:26 ` Koul, Vinod
[not found] ` <8D3F6266AEB6384E807C6FFC6FE195E30181BBF0-yHIBzpp8AekElmVAvsQTrbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-10-04 15:23 ` Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2012-10-03 17:18 Laxman Dewangan
2012-10-03 18:17 ` Greg KH
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=1349284913-22350-1-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=arm@kernel.org \
--cc=djbw@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=stable@kernel.org \
--cc=vinod.koul@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).