Messages in this thread Patch in this message | | | From | YueHaibing <> | Subject | [PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set | Date | Thu, 13 Dec 2018 11:19:24 +0800 |
| |
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@huawei.com> --- 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
| |