regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Fri, 21 Aug 2020 03:12:35 +0000 (11:12 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 21 Aug 2020 16:28:10 +0000 (17:28 +0100)
Fix below warning when CONFIG_OF=n:

drivers/regulator/da9210-regulator.c:128:34: warning: ‘da9210_dt_ids’ defined but not used [-Wunused-const-variable=]
  128 | static const struct of_device_id da9210_dt_ids[] = {
      |                                  ^~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20200821111235.14473a88@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9210-regulator.c

index 0cdeb61..2aea442 100644 (file)
@@ -125,7 +125,7 @@ error_i2c:
  * I2C driver interface functions
  */
 
-static const struct of_device_id da9210_dt_ids[] = {
+static const struct of_device_id __maybe_unused da9210_dt_ids[] = {
        { .compatible = "dlg,da9210", },
        { }
 };