From: Myron Stowe Date: Thu, 9 Feb 2012 16:36:41 +0000 (-0700) Subject: ACPI: Fix logic for removing mappings in 'acpi_unmap' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8cdde126aa60ced0d63ff137378e09dd01dfadda;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ACPI: Fix logic for removing mappings in 'acpi_unmap' Make sure the removal of mappings uses the same logic that put the mappings in place. Signed-off-by: Myron Stowe Signed-off-by: Len Brown --- diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 412a1e04a922..5aef087d42d0 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -347,7 +347,7 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr) unsigned long pfn; pfn = pg_off >> PAGE_SHIFT; - if (page_is_ram(pfn)) + if (should_use_kmap(pfn)) kunmap(pfn_to_page(pfn)); else iounmap(vaddr);