diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-06-09 17:14:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-17 16:15:05 +0300 |
commit | bec6ece7928fa4a2a97e57ff58ce82ab8f73eb27 (patch) | |
tree | c77a2560a844086f9069062a39b6137f9bf7ace9 | |
parent | 29ed3385fc91aaa0605defb3a507d55c6d38d3bb (diff) | |
download | linux-bec6ece7928fa4a2a97e57ff58ce82ab8f73eb27.tar.xz |
dmaengine: dw: dmamux: Fix build without CONFIG_OF
[ Upstream commit 7811f2e7fd6a30d96eaa1fccf57b07694a8cad27 ]
When built without OF support, of_match_node() expands to NULL, which
produces the following output:
>> drivers/dma/dw/rzn1-dmamux.c:105:34: warning: unused variable 'rzn1_dmac_match' [-Wunused-const-variable]
static const struct of_device_id rzn1_dmac_match[] = {
One way to silence the warning is to enclose the structure definition
with an #ifdef CONFIG_OF/#endif block.
Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220609141455.300879-2-miquel.raynal@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/dma/dw/rzn1-dmamux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dw/rzn1-dmamux.c b/drivers/dma/dw/rzn1-dmamux.c index 0ce4fb58185e..f9912c3dd4d7 100644 --- a/drivers/dma/dw/rzn1-dmamux.c +++ b/drivers/dma/dw/rzn1-dmamux.c @@ -102,10 +102,12 @@ free_map: return ERR_PTR(ret); } +#ifdef CONFIG_OF static const struct of_device_id rzn1_dmac_match[] = { { .compatible = "renesas,rzn1-dma" }, {} }; +#endif static int rzn1_dmamux_probe(struct platform_device *pdev) { |