Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <arnd@arndb.de>
Cc: Tom Rix <trix@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20210618224618.1487323-1-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Moritz Fischer and committed by
Greg Kroah-Hartman
1e2658ae 37a0ca7f

+2
+2
drivers/fpga/machxo2-spi.c
··· 374 374 return devm_fpga_mgr_register(dev, mgr); 375 375 } 376 376 377 + #ifdef CONFIG_OF 377 378 static const struct of_device_id of_match[] = { 378 379 { .compatible = "lattice,machxo2-slave-spi", }, 379 380 {} 380 381 }; 381 382 MODULE_DEVICE_TABLE(of, of_match); 383 + #endif 382 384 383 385 static const struct spi_device_id lattice_ids[] = { 384 386 { "machxo2-slave-spi", 0 },