summaryrefslogtreecommitdiff
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorHeesub Shin <heesub.shin@samsung.com>2014-05-30 05:26:29 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-20 02:38:33 +0400
commit06566f5dc3f30e74de9e7bee4da6aad9ca35f287 (patch)
tree395ae95880b35a1d5ebf757ebf531b2ca300911c /drivers/staging/android
parent7eb88bffbd883fa78944799ff3887da916159a59 (diff)
downloadlinux-06566f5dc3f30e74de9e7bee4da6aad9ca35f287.tar.xz
staging: ion: remove order argument from free_buffer_page()
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin <heesub.shin@samsung.com> Reviewed-by: Mitchel Humpherys <mitchelh@codeaurora.org> Tested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/ion/ion_system_heap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index f3b9008f90cb..e0a7e5491f59 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -78,9 +78,9 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
}
static void free_buffer_page(struct ion_system_heap *heap,
- struct ion_buffer *buffer, struct page *page,
- unsigned int order)
+ struct ion_buffer *buffer, struct page *page)
{
+ unsigned int order = compound_order(page);
bool cached = ion_buffer_cached(buffer);
if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) {
@@ -171,7 +171,7 @@ free_table:
kfree(table);
free_pages:
list_for_each_entry_safe(page, tmp_page, &pages, lru)
- free_buffer_page(sys_heap, buffer, page, compound_order(page));
+ free_buffer_page(sys_heap, buffer, page);
return -ENOMEM;
}
@@ -191,8 +191,7 @@ static void ion_system_heap_free(struct ion_buffer *buffer)
ion_heap_buffer_zero(buffer);
for_each_sg(table->sgl, sg, table->nents, i)
- free_buffer_page(sys_heap, buffer, sg_page(sg),
- get_order(sg->length));
+ free_buffer_page(sys_heap, buffer, sg_page(sg));
sg_free_table(table);
kfree(table);
}