diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-10-24 14:32:09 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:33 -0800 |
commit | a4f6c55fc4d7cb10d563a965ae9cabb6a5369081 (patch) | |
tree | 1d7f1a55f2c4d411f8dbf221f08f3772073f863a /arch | |
parent | 6b61a21a06e368df6e4e9fd91c94c6466df985ee (diff) |
ARM: tegra: Fix board-specific initcalls
These initcalls weren't ensuring that they're actually running on the
board they care about, which breaks on a multi-board kernel.
Change-Id: Ifd8a3e523c2523b68ec4d7e30c2b87969b939931
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/60010
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R2a4547ecd3b25da494799af15e42df89700b9fde
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index c35b7e17cbd0..82b627ef26eb 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -30,6 +30,8 @@ #include <linux/regulator/tps6236x-regulator.h> #include <linux/power/gpio-charger.h> +#include <asm/mach-types.h> + #include <mach/iomap.h> #include <mach/irqs.h> #include <mach/pinmux.h> @@ -1092,6 +1094,9 @@ static struct platform_device cardhu_charger_device = { static int __init cardhu_charger_late_init(void) { + if (!machine_is_cardhu()) + return 0; + platform_device_register(&cardhu_charger_device); return 0; } diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 2c3f0b2c3e6d..db2aa2054ef2 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -913,6 +913,9 @@ int __init cardhu_ov5650_late_init(void) int ret; int i; + if (!machine_is_cardhu()) + return 0; + if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291)) return 0; diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c index 3d803706fe02..1074a81325a7 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -626,6 +626,9 @@ static void __init tegra_ventana_init(void) int __init tegra_ventana_protected_aperture_init(void) { + if (!machine_is_ventana()) + return 0; + tegra_protected_aperture_init(tegra_grhost_aperture); return 0; } |