ACPI: Fix logic for removing mappings in 'acpi_unmap'
authorMyron Stowe <mstowe@redhat.com>
Thu, 9 Feb 2012 16:36:41 +0000 (09:36 -0700)
committerLen Brown <len.brown@intel.com>
Fri, 30 Mar 2012 08:05:14 +0000 (04:05 -0400)
Make sure the removal of mappings uses the same logic that put the
mappings in place.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/osl.c

index 412a1e04a9226a84970654c433597455cb53f0ca..5aef087d42d0d9f37755655fcb1b4862ff12c332 100644 (file)
@@ -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);