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

ARM: imx: Remove imx_add_imx_dma() unused irq_err argument

No callers of imx_add_imx_dma() need an error IRQ, so they supply 0 as
"irq_err", which means we register a resource of IRQ 0, which is invalid
and causes a warning if used.

Remove the "irq_err" argument altogether so there's no chance of trying to
use the invalid IRQ 0.

Fixes: a85a6c86c25be ("driver core: platform: Clarify that IRQ 0 is invalid")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: kernel@pengutronix.de
Cc: Fabio Estevam <festevam@gmail.com>
Cc: linux-imx@nxp.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Bjorn Helgaas and committed by
Shawn Guo
f8951dce 2a835440

+4 -10
+1 -1
arch/arm/mach-imx/devices/devices-common.h
··· 289 289 const struct spi_imx_master *pdata); 290 290 291 291 struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase, 292 - int irq, int irq_err); 292 + int irq); 293 293 struct platform_device *imx_add_imx_sdma(char *name, 294 294 resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
+1 -5
arch/arm/mach-imx/devices/platform-imx-dma.c
··· 6 6 #include "devices-common.h" 7 7 8 8 struct platform_device __init __maybe_unused *imx_add_imx_dma(char *name, 9 - resource_size_t iobase, int irq, int irq_err) 9 + resource_size_t iobase, int irq) 10 10 { 11 11 struct resource res[] = { 12 12 { ··· 16 16 }, { 17 17 .start = irq, 18 18 .end = irq, 19 - .flags = IORESOURCE_IRQ, 20 - }, { 21 - .start = irq_err, 22 - .end = irq_err, 23 19 .flags = IORESOURCE_IRQ, 24 20 }, 25 21 };
+1 -2
arch/arm/mach-imx/mm-imx21.c
··· 78 78 mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 79 79 80 80 pinctrl_provide_dummies(); 81 - imx_add_imx_dma("imx21-dma", MX21_DMA_BASE_ADDR, 82 - MX21_INT_DMACH0, 0); /* No ERR irq */ 81 + imx_add_imx_dma("imx21-dma", MX21_DMA_BASE_ADDR, MX21_INT_DMACH0); 83 82 platform_device_register_simple("imx21-audmux", 0, imx21_audmux_res, 84 83 ARRAY_SIZE(imx21_audmux_res)); 85 84 }
+1 -2
arch/arm/mach-imx/mm-imx27.c
··· 79 79 mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); 80 80 81 81 pinctrl_provide_dummies(); 82 - imx_add_imx_dma("imx27-dma", MX27_DMA_BASE_ADDR, 83 - MX27_INT_DMACH0, 0); /* No ERR irq */ 82 + imx_add_imx_dma("imx27-dma", MX27_DMA_BASE_ADDR, MX27_INT_DMACH0); 84 83 /* imx27 has the imx21 type audmux */ 85 84 platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res, 86 85 ARRAY_SIZE(imx27_audmux_res));