From: Jisheng Zhang Date: Mon, 10 Aug 2020 01:57:53 +0000 (+0800) Subject: regulator: sy8827n: Fix W=1 build warning when CONFIG_OF=n X-Git-Tag: v5.10-rc1~173^2^2~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a16138a32eeeca01e2603193288ff0714bead11d;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200810095753.59ce9f75@xhacker.debian Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/sy8827n.c b/drivers/regulator/sy8827n.c index b207217f74d80..52e8c17afe243 100644 --- a/drivers/regulator/sy8827n.c +++ b/drivers/regulator/sy8827n.c @@ -156,6 +156,7 @@ static int sy8827n_i2c_probe(struct i2c_client *client) return ret; } +#ifdef CONFIG_OF static const struct of_device_id sy8827n_dt_ids[] = { { .compatible = "silergy,sy8827n", @@ -163,6 +164,7 @@ static const struct of_device_id sy8827n_dt_ids[] = { { } }; MODULE_DEVICE_TABLE(of, sy8827n_dt_ids); +#endif static const struct i2c_device_id sy8827n_id[] = { { "sy8827n", },