Commit a16138a3 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Mark Brown

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

Fixing W=1 build warning when no support for device tree is there.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200810095753.59ce9f75@xhacker.debianSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 989e08c3
...@@ -156,6 +156,7 @@ static int sy8827n_i2c_probe(struct i2c_client *client) ...@@ -156,6 +156,7 @@ static int sy8827n_i2c_probe(struct i2c_client *client)
return ret; return ret;
} }
#ifdef CONFIG_OF
static const struct of_device_id sy8827n_dt_ids[] = { static const struct of_device_id sy8827n_dt_ids[] = {
{ {
.compatible = "silergy,sy8827n", .compatible = "silergy,sy8827n",
...@@ -163,6 +164,7 @@ static const struct of_device_id sy8827n_dt_ids[] = { ...@@ -163,6 +164,7 @@ static const struct of_device_id sy8827n_dt_ids[] = {
{ } { }
}; };
MODULE_DEVICE_TABLE(of, sy8827n_dt_ids); MODULE_DEVICE_TABLE(of, sy8827n_dt_ids);
#endif
static const struct i2c_device_id sy8827n_id[] = { static const struct i2c_device_id sy8827n_id[] = {
{ "sy8827n", }, { "sy8827n", },
......
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