summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-08-28 09:37:04 +0100
committerLee Jones <lee.jones@linaro.org>2020-09-30 16:24:50 +0100
commite26ea09b6e0995cb65760e44042e26d3e40452a7 (patch)
treec7752d45cae533e92b9fbda564cd10427a00ee18 /drivers/mfd
parentd1264a075ed65d6b174a4742e69186125e66fd27 (diff)
downloadlinux-stable-e26ea09b6e0995cb65760e44042e26d3e40452a7.tar.gz
linux-stable-e26ea09b6e0995cb65760e44042e26d3e40452a7.tar.bz2
linux-stable-e26ea09b6e0995cb65760e44042e26d3e40452a7.zip
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/khadas-mcu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
index 44d5bb462dab..f3d418810693 100644
--- a/drivers/mfd/khadas-mcu.c
+++ b/drivers/mfd/khadas-mcu.c
@@ -122,11 +122,13 @@ static int khadas_mcu_probe(struct i2c_client *client,
return 0;
}
+#ifdef CONFIG_OF
static const struct of_device_id khadas_mcu_of_match[] = {
{ .compatible = "khadas,mcu", },
{},
};
MODULE_DEVICE_TABLE(of, khadas_mcu_of_match);
+#endif
static struct i2c_driver khadas_mcu_driver = {
.driver = {