[RAMEN9610-12171] ion: allocate zero for system heap id
authorhyesoo.yu <hyesoo.yu@samsung.com>
Thu, 13 Sep 2018 02:13:31 +0000 (11:13 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:16 +0000 (20:23 +0300)
Traditionally, the system heap is was always zero.
The heap id is created according to the registered order
after kernel 4.12, but the system heap is registered first
to provide compatibility with users to use the system heap.

Change-Id: I46f203a533f6c29b62ced6b49c0a5a5a98e2a914
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/staging/android/ion/ion_fdt_exynos.c
drivers/staging/android/ion/ion_system_heap.c

index 5ae79fa2aab1dcb284b927335c2b6298e7f1680b..f4120684a37429fa4cb8318c10bf1691b2fce7ea 100644 (file)
@@ -283,4 +283,4 @@ static int __init exynos_ion_register_heaps(void)
 
        return 0;
 }
-subsys_initcall(exynos_ion_register_heaps);
+subsys_initcall_sync(exynos_ion_register_heaps);
index 44e11f4d687c732df6b86eefe37d007912d334a7..b186fccd850dd856be9662f459883c30c03bb0ea 100644 (file)
@@ -378,7 +378,7 @@ static int ion_system_heap_create(void)
        ion_device_add_heap(heap);
        return 0;
 }
-subsys_initcall_sync(ion_system_heap_create);
+subsys_initcall(ion_system_heap_create);
 
 static int ion_system_contig_heap_allocate(struct ion_heap *heap,
                                           struct ion_buffer *buffer,