[PATCH] i2c: i801: mark PM functions as __maybe_unused

From: Anders Roxell
Date: Tue May 08 2018 - 03:39:06 EST


With CONFIG_PM, we get a harmless build warning:
drivers/i2c/busses/i2c-i801.c:1723:12: warning: âi801_resumeâ defined but not used [-Wunused-function]
static int i801_resume(struct device *dev)
^~~~~~~~~~~
drivers/i2c/busses/i2c-i801.c:1714:12: warning: âi801_suspendâ defined but not used [-Wunused-function]
static int i801_suspend(struct device *dev)
^~~~~~~~~~~~

This marks the affected functions as __maybe_unused.

Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
---
drivers/i2c/busses/i2c-i801.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index ed07f9002710..ff18c6ed2bec 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1711,7 +1711,7 @@ static void i801_shutdown(struct pci_dev *dev)
}

#ifdef CONFIG_PM
-static int i801_suspend(struct device *dev)
+static int __maybe_unused i801_suspend(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct i801_priv *priv = pci_get_drvdata(pci_dev);
@@ -1720,7 +1720,7 @@ static int i801_suspend(struct device *dev)
return 0;
}

-static int i801_resume(struct device *dev)
+static int __maybe_unused i801_resume(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct i801_priv *priv = pci_get_drvdata(pci_dev);
--
2.17.0