From a876bf5ecaa1795c77697f122e6aecb9ce404ba6 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Wed, 7 Aug 2019 09:57:10 -0700 Subject: [PATCH] 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 --- drivers/staging/android/ion/ion.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index d5716fb7b155..7142185c9410 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -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