aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/tty/serial/sprd_serial.c
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2015-02-03 21:05:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-07 03:13:07 +0100
commitb51e3f5ad5b2618702d689942dfaf7b15ea5eba4 (patch)
tree0752c7c0e3d6b79f8f776a2263cf2ee2fccd9604 /drivers/tty/serial/sprd_serial.c
parentserial:imx make of_device_id array const (diff)
downloadwireguard-linux-b51e3f5ad5b2618702d689942dfaf7b15ea5eba4.tar.xz
wireguard-linux-b51e3f5ad5b2618702d689942dfaf7b15ea5eba4.zip
sprd_serial: compile sprd_suspend and sprd_resume conditionally
Building sprd_serial.o when CONFIG_PM_SLEEP is not defined triggers these warnings: drivers/tty/serial/sprd_serial.c:755:12: warning: ‘sprd_suspend’ defined but not used [-Wunused-function] static int sprd_suspend(struct device *dev) ^ drivers/tty/serial/sprd_serial.c:764:12: warning: ‘sprd_resume’ defined but not used [-Wunused-function] static int sprd_resume(struct device *dev) ^ Let's compile these functions only when CONFIG_PM_SLEEP is defined. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sprd_serial.c')
-rw-r--r--drivers/tty/serial/sprd_serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 594b63331ef4..be3ed3f4ad60 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -752,6 +752,7 @@ static int sprd_probe(struct platform_device *pdev)
return ret;
}
+#ifdef CONFIG_PM_SLEEP
static int sprd_suspend(struct device *dev)
{
struct sprd_uart_port *sup = dev_get_drvdata(dev);
@@ -769,6 +770,7 @@ static int sprd_resume(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(sprd_pm_ops, sprd_suspend, sprd_resume);