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

mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning

When testing with !OF, the build system reports:

>> drivers/mfd/khadas-mcu.c:125:34: warning: unused variable 'khadas_mcu_of_match' [-Wunused-const-variable]
static const struct of_device_id khadas_mcu_of_match[] = {
^
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

+2
+2
drivers/mfd/khadas-mcu.c
··· 122 122 return 0; 123 123 } 124 124 125 + #ifdef CONFIG_OF 125 126 static const struct of_device_id khadas_mcu_of_match[] = { 126 127 { .compatible = "khadas,mcu", }, 127 128 {}, 128 129 }; 129 130 MODULE_DEVICE_TABLE(of, khadas_mcu_of_match); 131 + #endif 130 132 131 133 static struct i2c_driver khadas_mcu_driver = { 132 134 .driver = {