fpga: xilinx-pr-decoupler: Address warning about unused variable
authorMoritz Fischer <mdf@kernel.org>
Fri, 2 Jul 2021 03:54:03 +0000 (20:54 -0700)
committerMoritz Fischer <mdf@kernel.org>
Sat, 24 Jul 2021 22:10:30 +0000 (15:10 -0700)
warning: ‘xlnx_pr_decoupler_of_match’ defined but not used
 [-Wunused-const-variable=]
 static const struct of_device_id xlnx_pr_decoupler_of_match[] = {

Fixes: 7e961c12be42 ("fpga: Add support for Xilinx LogiCORE PR Decoupler")
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/xilinx-pr-decoupler.c

index ea2bde6e5bc4e101b8a5ad116aea8336dba7d654..e986ed47c4ed702866796eab197a3ed5b4776831 100644 (file)
@@ -81,6 +81,7 @@ static const struct fpga_bridge_ops xlnx_pr_decoupler_br_ops = {
        .enable_show = xlnx_pr_decoupler_enable_show,
 };
 
+#ifdef CONFIG_OF
 static const struct xlnx_config_data decoupler_config = {
        .name = "Xilinx PR Decoupler",
 };
@@ -99,6 +100,7 @@ static const struct of_device_id xlnx_pr_decoupler_of_match[] = {
        {},
 };
 MODULE_DEVICE_TABLE(of, xlnx_pr_decoupler_of_match);
+#endif
 
 static int xlnx_pr_decoupler_probe(struct platform_device *pdev)
 {