The amlogic codec ion is not used, threre is build error.
Fix the build error with checking config option.
Change-Id: Id21dcb4285facd5ed8c22082d8923be2c460909b
Fixes: deca8a9c7029 ("ion_dev: add codec_mm heap for omx. [3/3]")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
obj-$(CONFIG_ION) += ion.o ion-ioctl.o ion_heap.o \
ion_page_pool.o ion_system_heap.o \
- ion_carveout_heap.o ion_chunk_heap.o ion_cma_heap.o ion_codec_mm_heap.o
+ ion_carveout_heap.o ion_chunk_heap.o ion_cma_heap.o
obj-$(CONFIG_ION_TEST) += ion_test.o
ifdef CONFIG_COMPAT
obj-$(CONFIG_ION) += compat_ion.o
endif
+ifdef CONFIG_AMLOGIC_MEDIA_CODEC_MM
+obj-$(CONFIG_ION) += ion_codec_mm_heap.o
+endif
obj-$(CONFIG_ION_DUMMY) += ion_dummy_driver.o
obj-$(CONFIG_ION_TEGRA) += tegra/
case ION_HEAP_TYPE_DMA:
heap = ion_cma_heap_create(heap_data);
break;
+#if defined(CONFIG_AMLOGIC_MEDIA_CODEC_MM)
case ION_HEAP_TYPE_CUSTOM:
heap = ion_codec_mm_heap_create(heap_data);
break;
+#endif
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap_data->type);
case ION_HEAP_TYPE_DMA:
ion_cma_heap_destroy(heap);
break;
+#if defined(CONFIG_AMLOGIC_MEDIA_CODEC_MM)
case ION_HEAP_TYPE_CUSTOM:
ion_codec_mm_heap_destroy(heap);
break;
+#endif
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap->type);
struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *);
void ion_cma_heap_destroy(struct ion_heap *);
+#if defined(CONFIG_AMLOGIC_MEDIA_CODEC_MM)
/**
* The codec_mm heap returns physical addresses, since 0 may be a valid
* physical address, this is used to indicate allocation failed
*/
struct ion_heap *ion_codec_mm_heap_create(struct ion_platform_heap *heap_data);
void ion_codec_mm_heap_destroy(struct ion_heap *heap);
+#endif
/**
* functions for creating and destroying a heap pool -- allows you