Skip to contentSkip to conversation

x86/olpc/xo15/sci: Fix resume handler build warning

PATCH New Borislav Petkov 2 participants 2 messages Nov 26, 2016 – Nov 28, 2016 x86

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86/olpc/xo15/sci: Fix resume handler build warning

From: Borislav Petkov <[email protected]>

Fix:

arch/x86/platform/olpc/olpc-xo15-sci.c:199:12: warning: ‘xo15_sci_resume’ defined but not used [-Wunused-function]
static int xo15_sci_resume(struct device *dev)

              ^

which I see in randconfig builds here.

---
 arch/x86/platform/olpc/olpc-xo15-sci.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/platform/olpc/olpc-xo15-sci.c +2 -0
index 55130846ac87..c0533fbc39e3 100644
@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int xo15_sci_resume(struct device *dev)
 {
 	/* Enable all EC events */
@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
 
Signature · 1 line
2.10.0
#1 lore raw

[tip:x86/urgent] x86/platform/olpc: Fix resume handler build warning

x86/platform/olpc: Fix resume handler build warning
Commit-ID:  20ab6677716c7bbdcfd1cdb9aef296a0b3101f73
Gitweb:     http://git.kernel.org/tip/20ab6677716c7bbdcfd1cdb9aef296a0b3101f73
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sat, 26 Nov 2016 15:27:06 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 28 Nov 2016 07:46:03 +0100

x86/platform/olpc: Fix resume handler build warning

Fix:

arch/x86/platform/olpc/olpc-xo15-sci.c:199:12: warning: ‘xo15_sci_resume’ defined but not used [-Wunused-function]
static int xo15_sci_resume(struct device *dev)

              ^

which I see in randconfig builds here.

---
 arch/x86/platform/olpc/olpc-xo15-sci.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/platform/olpc/olpc-xo15-sci.c +2 -0
index 5513084..c0533fb 100644
@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int xo15_sci_resume(struct device *dev)
 {
 	/* Enable all EC events */
@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);