diff options
author | Gary King <gking@nvidia.com> | 2010-05-28 10:57:41 -0700 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-28 11:25:38 -0700 |
commit | a0d06d69c65f7578f3dfeae0a22a780184e855d7 (patch) | |
tree | 8cf45e3dbb95f7461fcd4af318d155eaa04eb194 | |
parent | bae7c8c5f1f742279abe4aa751cc40def725ab5b (diff) |
nvmap: fix Kconfig dependencies for nvmap driver
nvmap shouldn't require MACH_TEGRA_GENERIC; it should be buildable
(sans NvRm APIs or NvOs preserved memory handle bootargs) in a stock
kernel. move the NvOs and NvRm dependencies to ifdef'd source code,
rather than Kconfigs
Change-Id: I11d4049460975bc9f2bf779c4c2fa6c7a8747583
Reviewed-on: http://git-master/r/1807
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
-rw-r--r-- | drivers/char/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/nvmap.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 94a31d13d255..4390ddf8c7d9 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -125,7 +125,7 @@ config BFIN_JTAG_COMM_CONSOLE config DEVNVMAP bool "/dev/nvmap device support" - depends on ARCH_TEGRA && MACH_TEGRA_GENERIC + depends on ARCH_TEGRA default y help Say Y here if you want to support the /dev/nvmap device. This device diff --git a/drivers/char/nvmap.c b/drivers/char/nvmap.c index e72e55aa0b23..dbd60a1a0d3a 100644 --- a/drivers/char/nvmap.c +++ b/drivers/char/nvmap.c @@ -2694,6 +2694,7 @@ static int _nvmap_try_create_preserved(struct nvmap_carveout *co, static void _nvmap_create_nvos_preserved(struct nvmap_carveout *co) { +#ifdef CONFIG_TEGRA_NVOS unsigned int i, key; NvBootArgsPreservedMemHandle mem; static int was_created[NvBootArgKey_PreservedMemHandle_Num - @@ -2717,6 +2718,7 @@ static void _nvmap_create_nvos_preserved(struct nvmap_carveout *co) else _nvmap_handle_put(h); } +#endif } int nvmap_add_carveout_heap(unsigned long base, size_t size, @@ -2852,6 +2854,7 @@ static int nvmap_split_carveout_heap(struct nvmap_carveout *co, size_t size, /* NvRmMemMgr APIs implemented on top of nvmap */ +#ifdef CONFIG_TEGRA_NVRM #include <linux/freezer.h> NvU32 NvRmMemGetAddress(NvRmMemHandle hMem, NvU32 Offset) @@ -3278,3 +3281,4 @@ NvError NvRmMemHandlePreserveHandle(NvRmMemHandle hMem, NvU32 *pKey) { return NvError_NotSupported; } +#endif |