Merge tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[sfrench/cifs-2.6.git] / drivers / staging / android / ion / ion_system_heap.c
index 9ce2c0d7ac17ab4fa2a0cacbc0940d9887cb4e65..0383f7548d48e20d2858edbe69a59bfe2e7f2d7f 100644 (file)
@@ -109,7 +109,7 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
        unsigned long size_remaining = PAGE_ALIGN(size);
        unsigned int max_order = orders[0];
 
-       if (size / PAGE_SIZE > totalram_pages / 2)
+       if (size / PAGE_SIZE > totalram_pages() / 2)
                return -ENOMEM;
 
        INIT_LIST_HEAD(&pages);