Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a876bf5e authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

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: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent fe5698e7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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