Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Geert Uytterhoeven and committed by
Vinod Koul
e0c51fd0 8049f77f

+6 -9
+6 -9
drivers/dma/sh/rz-dmac.c
··· 65 65 void __iomem *ch_base; 66 66 void __iomem *ch_cmn_base; 67 67 unsigned int index; 68 - int irq; 69 68 struct rz_dmac_desc *desc; 70 69 int descs_allocated; 71 70 ··· 794 795 struct rz_lmdesc *lmdesc; 795 796 char pdev_irqname[6]; 796 797 char *irqname; 797 - int ret; 798 + int irq, ret; 798 799 799 800 channel->index = index; 800 801 channel->mid_rid = -EINVAL; 801 802 802 803 /* Request the channel interrupt. */ 803 804 scnprintf(pdev_irqname, sizeof(pdev_irqname), "ch%u", index); 804 - channel->irq = platform_get_irq_byname(pdev, pdev_irqname); 805 - if (channel->irq < 0) 806 - return channel->irq; 805 + irq = platform_get_irq_byname(pdev, pdev_irqname); 806 + if (irq < 0) 807 + return irq; 807 808 808 809 irqname = devm_kasprintf(dmac->dev, GFP_KERNEL, "%s:%u", 809 810 dev_name(dmac->dev), index); 810 811 if (!irqname) 811 812 return -ENOMEM; 812 813 813 - ret = devm_request_threaded_irq(dmac->dev, channel->irq, 814 - rz_dmac_irq_handler, 814 + ret = devm_request_threaded_irq(dmac->dev, irq, rz_dmac_irq_handler, 815 815 rz_dmac_irq_handler_thread, 0, 816 816 irqname, channel); 817 817 if (ret) { 818 - dev_err(dmac->dev, "failed to request IRQ %u (%d)\n", 819 - channel->irq, ret); 818 + dev_err(dmac->dev, "failed to request IRQ %u (%d)\n", irq, ret); 820 819 return ret; 821 820 } 822 821