PM: cpuidle: Fix cpuidle_poll_state_init() prototype

"Linux Kernel Mailing List" <[email protected]> Fri, 16 Feb 2018 17:08:31 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/d7212cfb05ba802bea4dd6c90d61cfe6366ea224
Commit:     d7212cfb05ba802bea4dd6c90d61cfe6366ea224
Parent:     b6d8ef86cb7b8b6920b6815ebf1352757d3adb87
Refname:    refs/heads/master
Author:     Rafael J. Wysocki <[email protected]>
AuthorDate: Mon Feb 12 11:34:22 2018 +0100
Committer:  Rafael J. Wysocki <[email protected]>
CommitDate: Mon Feb 12 11:34:22 2018 +0100

    PM: cpuidle: Fix cpuidle_poll_state_init() prototype
    
    Commit f85942207516 (x86: PM: Make APM idle driver initialize polling
    state) made apm_init() call cpuidle_poll_state_init(), but that only
    is defined for CONFIG_CPU_IDLE set, so make the empty stub of it
    available for CONFIG_CPU_IDLE unset too to fix the resulting build
    issue.
    
    Fixes: f85942207516 (x86: PM: Make APM idle driver initialize polling state)
    Cc: 4.14+ <[email protected]> # 4.14+
    Signed-off-by: Rafael J. Wysocki <[email protected]>
---
 include/linux/cpuidle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 8f7788d23b57..a6989e02d0a0 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -225,7 +225,7 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev,
 }
 #endif
 
-#ifdef CONFIG_ARCH_HAS_CPU_RELAX
+#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX)
 void cpuidle_poll_state_init(struct cpuidle_driver *drv);
 #else
 static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html