diff mbox series

[v2,07/15] regulator: max1586: Fix W=1 build warning when CONFIG_OF=n

Message ID 20200821111601.26243417@xhacker.debian (mailing list archive)
State Accepted
Commit 44bc5d168dc209bddafb3269f72a74c3cbb0d820
Headers show
Series regulator: Fix W=1 build warning when CONFIG_OF=n | expand

Commit Message

Jisheng Zhang Aug. 21, 2020, 3:16 a.m. UTC
Fix below warning when CONFIG_OF=n:

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

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/max1586.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index f8941025780b..d4958394e608 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -201,7 +201,7 @@  static int of_get_max1586_platform_data(struct device *dev,
 	return 0;
 }
 
-static const struct of_device_id max1586_of_match[] = {
+static const struct of_device_id __maybe_unused max1586_of_match[] = {
 	{ .compatible = "maxim,max1586", },
 	{},
 };