arm: tegra: Declare tegra_throttling_enable in .h
Robert Morell [Thu, 19 May 2011 16:31:45 +0000 (09:31 -0700)]
The build currently fails for some boards when CONFIG_CPU_FREQ=n, since
we don't build cpu-tegra.c but tegra_throttling_enable is still
referenced.  To fix this:
- Add cpu-tegra.h
- Define tegra_throttling_enable to NULL in the header if either
  CONFIG_CPU_FREQ or CONFIG_TEGRA_THERMAL_THROTTLE are not set
- Use the header file instead of declaring the function extern
  everywhere it's used

Bug 829501

Original-Change-Id: Ice84309546dee201f991a1194fefd80583afc455
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Reviewed-on: http://git-master/r/32208
Reviewed-by: Allen R Martin <amartin@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

Rebase-Id: R1f22b33952e038a770ecdb0ed894e3f85017fdec

arch/arm/mach-tegra/board-cardhu-sensors.c

index b225c77..aa88d45 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "gpio-names.h"
 #include "board-cardhu.h"
+#include "cpu-tegra.h"
 
 static struct regulator *cardhu_1v8_cam1 = NULL;
 static struct regulator *cardhu_1v8_cam2 = NULL;
@@ -429,8 +430,6 @@ static struct i2c_board_info cardhu_i2c8_board_info[] = {
        },
 };
 
-extern void tegra_throttling_enable(bool enable);
-
 static struct nct1008_platform_data cardhu_nct1008_pdata = {
        .supported_hwrev = true,
        .ext_range = false,