diff options
author | Laura Abbott | 2017-04-03 20:57:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-04-08 12:35:11 +0200 |
commit | 1d9735efaceb1fdd921e0a08a914cbec4fdd0b1b (patch) | |
tree | 47421d2376a858adaea7a383601e99639a8ae032 /drivers/staging/android/ion/ion_system_heap.c | |
parent | staging: android: ion: Remove dmap_cnt (diff) | |
download | kernel-qcow2-linux-1d9735efaceb1fdd921e0a08a914cbec4fdd0b1b.tar.gz kernel-qcow2-linux-1d9735efaceb1fdd921e0a08a914cbec4fdd0b1b.tar.xz kernel-qcow2-linux-1d9735efaceb1fdd921e0a08a914cbec4fdd0b1b.zip |
staging: android: ion: Remove alignment from allocation field
The align field was supposed to be used to specify the alignment of
the allocation. Nobody actually does anything with it except to check
if the alignment specified is out of bounds. Since this has no effect
on the actual allocation, just remove it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_system_heap.c')
-rw-r--r-- | drivers/staging/android/ion/ion_system_heap.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 3ebbb75746e8..6cb2fe7ec07f 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -129,7 +129,7 @@ static struct page *alloc_largest_available(struct ion_system_heap *heap, static int ion_system_heap_allocate(struct ion_heap *heap, struct ion_buffer *buffer, - unsigned long size, unsigned long align, + unsigned long size, unsigned long flags) { struct ion_system_heap *sys_heap = container_of(heap, @@ -143,9 +143,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap, unsigned long size_remaining = PAGE_ALIGN(size); unsigned int max_order = orders[0]; - if (align > PAGE_SIZE) - return -EINVAL; - if (size / PAGE_SIZE > totalram_pages / 2) return -ENOMEM; @@ -372,7 +369,6 @@ void ion_system_heap_destroy(struct ion_heap *heap) static int ion_system_contig_heap_allocate(struct ion_heap *heap, struct ion_buffer *buffer, unsigned long len, - unsigned long align, unsigned long flags) { int order = get_order(len); @@ -381,9 +377,6 @@ static int ion_system_contig_heap_allocate(struct ion_heap *heap, unsigned long i; int ret; - if (align > (PAGE_SIZE << order)) - return -EINVAL; - page = alloc_pages(low_order_gfp_flags, order); if (!page) return -ENOMEM; |