Commit 7811f2e7 authored by Miquel Raynal's avatar Miquel Raynal Committed by Vinod Koul
Browse files

dmaengine: dw: dmamux: Fix build without CONFIG_OF



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: 134d9c52 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220609141455.300879-2-miquel.raynal@bootlin.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 2717d338
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -102,10 +102,12 @@ static void *rzn1_dmamux_route_allocate(struct of_phandle_args *dma_spec,
	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)
{