android: ion: promote heap add priority
authorCho KyongHo <pullip.cho@samsung.com>
Fri, 2 Feb 2018 14:01:10 +0000 (23:01 +0900)
committerSangwook Ju <sw.ju@samsung.com>
Mon, 14 May 2018 10:45:22 +0000 (19:45 +0900)
Changed heap registration priority to subsys_initcall_sync() because
some drivers calls ion_alloc() in probe() that is called in
device_initcall() priority.

Change-Id: Ib1a06d147c75b0601c4807cea82dfcaca4cb526a
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/staging/android/ion/ion_system_heap.c

index b6ece18e6a8817eb3c71b03b9c7b39ce7346b640..81c1ac968d7a63322e4aacb52f11a11781f4c81b 100644 (file)
@@ -358,7 +358,7 @@ static int ion_system_heap_create(void)
        ion_device_add_heap(heap);
        return 0;
 }
-device_initcall(ion_system_heap_create);
+subsys_initcall_sync(ion_system_heap_create);
 
 static int ion_system_contig_heap_allocate(struct ion_heap *heap,
                                           struct ion_buffer *buffer,
@@ -451,5 +451,5 @@ static int ion_system_contig_heap_create(void)
        ion_device_add_heap(heap);
        return 0;
 }
-device_initcall(ion_system_contig_heap_create);
+subsys_initcall_sync(ion_system_contig_heap_create);