]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: codecs: wcd938x: fix unused variable warning
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 21 Jun 2021 13:45:01 +0000 (14:45 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 22 Jun 2021 11:47:12 +0000 (12:47 +0100)
This patch fixes below

warning: unused variable wcd938x_dt_match

by placing device match table under CONFIG_OF

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210621134502.19537-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd938x.c

index cb22fdf812f4321f45c98ada59fc93a409327152..aac854e3ba9b1b70dea89aa497fb22d104d54758 100644 (file)
@@ -3713,12 +3713,14 @@ static int wcd938x_remove(struct platform_device *pdev)
        return 0;
 }
 
+#if defined(CONFIG_OF)
 static const struct of_device_id wcd938x_dt_match[] = {
        { .compatible = "qcom,wcd9380-codec" },
        { .compatible = "qcom,wcd9385-codec" },
        {}
 };
 MODULE_DEVICE_TABLE(of, wcd938x_dt_match);
+#endif
 
 static struct platform_driver wcd938x_codec_driver = {
        .probe = wcd938x_probe,