diff options
author | Moritz Fischer <[email protected]> | 2021-06-18 15:46:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-06-24 15:45:11 +0200 |
commit | 1e2658aef517bec2327b22e1ddb12e33cceee38e (patch) | |
tree | 30479dfb6041acea844548607cbfdf4cc1f56a16 | |
parent | 37a0ca7f3e60cb1fc076444b964b45fdaf930a52 (diff) |
fpga: machxo2-spi: Address warning about unused variable
Address warning about unused variable in case CONFIG_OF is not set.
warning: unused variable 'of_match' [-Wunused-const-variable]
static const struct of_device_id of_match[] = {
Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2 support")
Cc: Arnd Bergmann <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/fpga/machxo2-spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c index 114a64d2b7a4..1afb41aa20d7 100644 --- a/drivers/fpga/machxo2-spi.c +++ b/drivers/fpga/machxo2-spi.c @@ -374,11 +374,13 @@ static int machxo2_spi_probe(struct spi_device *spi) return devm_fpga_mgr_register(dev, mgr); } +#ifdef CONFIG_OF static const struct of_device_id of_match[] = { { .compatible = "lattice,machxo2-slave-spi", }, {} }; MODULE_DEVICE_TABLE(of, of_match); +#endif static const struct spi_device_id lattice_ids[] = { { "machxo2-slave-spi", 0 }, |