diff mbox

[2/2] tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE

Message ID 1377629554-17490-3-git-send-email-swarren@wwwdotorg.org
State Accepted, archived
Headers show

Commit Message

Stephen Warren Aug. 27, 2013, 6:52 p.m. UTC
From: Kyle McMartin <kyle@redhat.com>

While poking at something using the for-3.12/* trees, I hit the
following compile error:
drivers/built-in.o: In function `tegra_pcie_map_irq':
/builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:640:
undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
drivers/built-in.o: In function `tegra_msi_map':
/builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:1227:
undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
make: *** [vmlinux] Error 1

Since our .config had CONFIG_CPU_IDLE off. We should probably provide
an empty function to handle this to avoid cluttering up pci-tegra.c
with conditionals.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
[swarren, removed unnecessary return statement]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 include/linux/tegra-cpuidle.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Olof Johansson Aug. 29, 2013, 8:54 p.m. UTC | #1
On Tue, Aug 27, 2013 at 12:52:34PM -0600, Stephen Warren wrote:
> From: Kyle McMartin <kyle@redhat.com>
> 
> While poking at something using the for-3.12/* trees, I hit the
> following compile error:
> drivers/built-in.o: In function `tegra_pcie_map_irq':
> /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:640:
> undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
> drivers/built-in.o: In function `tegra_msi_map':
> /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:1227:
> undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
> make: *** [vmlinux] Error 1
> 
> Since our .config had CONFIG_CPU_IDLE off. We should probably provide
> an empty function to handle this to avoid cluttering up pci-tegra.c
> with conditionals.
> 
> Signed-off-by: Kyle McMartin <kyle@redhat.com>
> Reviewed-by: Thierry Reding <treding@nvidia.com>
> [swarren, removed unnecessary return statement]
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---

Applied.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/tegra-cpuidle.h b/include/linux/tegra-cpuidle.h
index dda3647..9c6286b 100644
--- a/include/linux/tegra-cpuidle.h
+++ b/include/linux/tegra-cpuidle.h
@@ -14,6 +14,12 @@ 
 #ifndef __LINUX_TEGRA_CPUIDLE_H__
 #define __LINUX_TEGRA_CPUIDLE_H__
 
+#ifdef CONFIG_CPU_IDLE
 void tegra_cpuidle_pcie_irqs_in_use(void);
+#else
+static inline void tegra_cpuidle_pcie_irqs_in_use(void)
+{
+}
+#endif
 
 #endif