summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2026-01-06 17:59:25 +0100
committerVinod Koul <vkoul@kernel.org>2026-01-09 07:57:36 +0530
commite0c51fd02f9cfab341907f6764d2f15c134eea55 (patch)
tree40b53247ae73ed70e61631c190b00733f4d8b073 /drivers/dma
parent8049f77fd820f47a2727c805de629a7433538eab (diff)
dmaengine: sh: rz-dmac: Make channel irq local
The channel IRQ is only used inside the function rz_dmac_chan_probe(), so there is no need to store it in the rz_dmac_chan structure for later use. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/312c2e3349f4747e0bca861632bfc3592224b012.1767718556.git.geert+renesas@glider.be Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/sh/rz-dmac.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
index 1f687b08d6b8..3e8d85c6639d 100644
--- a/drivers/dma/sh/rz-dmac.c
+++ b/drivers/dma/sh/rz-dmac.c
@@ -65,7 +65,6 @@ struct rz_dmac_chan {
void __iomem *ch_base;
void __iomem *ch_cmn_base;
unsigned int index;
- int irq;
struct rz_dmac_desc *desc;
int descs_allocated;
@@ -795,29 +794,27 @@ static int rz_dmac_chan_probe(struct rz_dmac *dmac,
struct rz_lmdesc *lmdesc;
char pdev_irqname[6];
char *irqname;
- int ret;
+ int irq, ret;
channel->index = index;
channel->mid_rid = -EINVAL;
/* Request the channel interrupt. */
scnprintf(pdev_irqname, sizeof(pdev_irqname), "ch%u", index);
- channel->irq = platform_get_irq_byname(pdev, pdev_irqname);
- if (channel->irq < 0)
- return channel->irq;
+ irq = platform_get_irq_byname(pdev, pdev_irqname);
+ if (irq < 0)
+ return irq;
irqname = devm_kasprintf(dmac->dev, GFP_KERNEL, "%s:%u",
dev_name(dmac->dev), index);
if (!irqname)
return -ENOMEM;
- ret = devm_request_threaded_irq(dmac->dev, channel->irq,
- rz_dmac_irq_handler,
+ ret = devm_request_threaded_irq(dmac->dev, irq, rz_dmac_irq_handler,
rz_dmac_irq_handler_thread, 0,
irqname, channel);
if (ret) {
- dev_err(dmac->dev, "failed to request IRQ %u (%d)\n",
- channel->irq, ret);
+ dev_err(dmac->dev, "failed to request IRQ %u (%d)\n", irq, ret);
return ret;
}