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

Fixes: 061c97d13f1a ("fpga manager: Add Xilinx slave serial SPI driver")
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/xilinx-spi.c

index fee4d0abf6bfe6d349110420c60ecc854d81bf47..b6bcf1d9233d2b46f11942d6220b3965765823ac 100644 (file)
@@ -256,11 +256,13 @@ static int xilinx_spi_probe(struct spi_device *spi)
        return devm_fpga_mgr_register(&spi->dev, mgr);
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id xlnx_spi_of_match[] = {
        { .compatible = "xlnx,fpga-slave-serial", },
        {}
 };
 MODULE_DEVICE_TABLE(of, xlnx_spi_of_match);
+#endif
 
 static struct spi_driver xilinx_slave_spi_driver = {
        .driver = {