From 6f125e87184ea5f8ad677c2cc4a9c9c6e717554b Mon Sep 17 00:00:00 2001
From: Moritz Fischer <mdf@kernel.org>
Date: Thu, 1 Jul 2021 20:54:04 -0700
Subject: [PATCH] fpga: zynqmp-fpga: Address warning about unused variable
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: 6f125e87184ea5f8ad677c2cc4a9c9c6e717554b
Patch-mainline: v5.15-rc1
References: git-fixes
Warning: ‘zynqmp_fpga_of_match’ defined but not used [-Wunused-const-variable=] static const struct of_device_id zynqmp_fpga_of_match[] = {
Fixes: c09f7471127e ("fpga manager: Adding FPGA Manager support for Xilinx zynqmp")
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
---
drivers/fpga/zynqmp-fpga.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/fpga/zynqmp-fpga.c
+++ b/drivers/fpga/zynqmp-fpga.c
@@ -136,12 +136,13 @@ static int zynqmp_fpga_remove(struct pla
return 0;
}
+#ifdef CONFIG_OF
static const struct of_device_id zynqmp_fpga_of_match[] = {
{ .compatible = "xlnx,zynqmp-pcap-fpga", },
{},
};
-
MODULE_DEVICE_TABLE(of, zynqmp_fpga_of_match);
+#endif
static struct platform_driver zynqmp_fpga_driver = {
.probe = zynqmp_fpga_probe,