[PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set

From: YueHaibing
Date: Wed Dec 12 2018 - 22:20:24 EST


with CONFIG_PM not set, gcc warning this:
drivers/usb/renesas_usbhs/common.c:844:12:
warning: 'usbhsc_suspend' defined but not used [-Wunused-function]
drivers/usb/renesas_usbhs/common.c:860:12:
warning: 'usbhsc_resume' defined but not used [-Wunused-function]

fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
drivers/usb/renesas_usbhs/common.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 02c1d2b..9390c76 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -841,6 +841,7 @@ static int usbhs_remove(struct platform_device *pdev)
return 0;
}

+#ifdef CONFIG_PM
static int usbhsc_suspend(struct device *dev)
{
struct usbhs_priv *priv = dev_get_drvdata(dev);
@@ -873,6 +874,7 @@ static int usbhsc_resume(struct device *dev)

return 0;
}
+#endif

static SIMPLE_DEV_PM_OPS(usbhsc_pm_ops, usbhsc_suspend, usbhsc_resume);

--
2.7.4