staging: android: ion: Do not assign heap IDs as heaps register

Some implementations of ION have predetermined heap IDs,
and as such, do not support dynamically assigned heap IDs.
Thus, do not assign heap IDs when the heaps register, so
as to respect their predetermined heap IDs.

Change-Id: I73fa688577da2a249cbe9b405356fc7cf5cb165a
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2019-08-07 09:57:10 -07:00
commit a876bf5eca

View file

@ -29,7 +29,6 @@
#include "ion.h"
static struct ion_device *internal_dev;
static int heap_id;
/* this function should only be called while dev->lock is held */
static void ion_buffer_add(struct ion_device *dev,
@ -680,7 +679,6 @@ void ion_device_add_heap(struct ion_heap *heap)
}
down_write(&dev->lock);
heap->id = heap_id++;
/*
* use negative heap->id to reverse the priority -- when traversing
* the list later attempt higher id numbers first