Commit c8b2c894 authored by ChiYuan Huang's avatar ChiYuan Huang Committed by Mark Brown

regulator: rt4801: Fix W=1 build warning when CONFIG_OF=n

Fix below warning when CONFIG_OF=n:

drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable]
  206 | static const struct of_device_id rt4801_of_id[] = {
      |                                  ^~~~~~~~~~~~
Signed-off-by: default avatarChiYuan Huang <cy_huang@richtek.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1598234713-8532-1-git-send-email-u0084500@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a5f79495
......@@ -203,7 +203,7 @@ static int rt4801_probe(struct i2c_client *i2c)
return 0;
}
static const struct of_device_id rt4801_of_id[] = {
static const struct of_device_id __maybe_unused rt4801_of_id[] = {
{ .compatible = "richtek,rt4801", },
{ },
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment