Skip to content

Commit a16138a

Browse files
rvoskbroonie
authored andcommitted
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: kernel test robot <lkp@intel.com> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200810095753.59ce9f75@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 989e08c commit a16138a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/regulator/sy8827n.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,15 @@ static int sy8827n_i2c_probe(struct i2c_client *client)
156156
return ret;
157157
}
158158

159+
#ifdef CONFIG_OF
159160
static const struct of_device_id sy8827n_dt_ids[] = {
160161
{
161162
.compatible = "silergy,sy8827n",
162163
},
163164
{ }
164165
};
165166
MODULE_DEVICE_TABLE(of, sy8827n_dt_ids);
167+
#endif
166168

167169
static const struct i2c_device_id sy8827n_id[] = {
168170
{ "sy8827n", },

0 commit comments

Comments
 (0)