media: atomisp: totalram_pages is now a function
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Apr 2020 10:46:57 +0000 (12:46 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:14 +0000 (12:32 +0200)
Fix the usage of totalram_pages, as this is now a function.

Fixes: ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c

index 198f29f4a32465349a4c97a286bbac5258cb7265..f4b975a18fa3a39b73a8d19475e658bd124514f3 100644 (file)
@@ -102,7 +102,7 @@ static phys_addr_t alloc_page_table(struct isp_mmu *mmu)
         * The slab allocator(kmem_cache and kmalloc family) doesn't handle
         * GFP_DMA32 flag, so we have to use buddy allocator.
         */
-       if (totalram_pages > (unsigned long)NR_PAGES_2GB)
+       if (totalram_pages() > (unsigned long)NR_PAGES_2GB)
                virt = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32);
        else
                virt = kmem_cache_zalloc(mmu->tbl_cache, GFP_KERNEL);