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>
This commit is contained in:
Lee Jones 2020-08-28 09:37:04 +01:00
parent d1264a075e
commit e26ea09b6e

View File

@ -122,11 +122,13 @@ static int khadas_mcu_probe(struct i2c_client *client,
return 0; return 0;
} }
#ifdef CONFIG_OF
static const struct of_device_id khadas_mcu_of_match[] = { static const struct of_device_id khadas_mcu_of_match[] = {
{ .compatible = "khadas,mcu", }, { .compatible = "khadas,mcu", },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, khadas_mcu_of_match); MODULE_DEVICE_TABLE(of, khadas_mcu_of_match);
#endif
static struct i2c_driver khadas_mcu_driver = { static struct i2c_driver khadas_mcu_driver = {
.driver = { .driver = {