[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ac6f4ab97c46fab2a4d5580d12a71f154f6a2826.1414029477.git.lv.zheng@intel.com>
Date: Thu, 23 Oct 2014 10:12:16 +0800
From: Lv Zheng <lv.zheng@...el.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Len Brown <len.brown@...el.com>
Cc: Lv Zheng <lv.zheng@...el.com>, Lv Zheng <zetalog@...il.com>,
<linux-kernel@...r.kernel.org>, linux-acpi@...r.kernel.org
Subject: [PATCH 3/6] ACPI/OSL: Cleanup memory access functions by merging duplicate code.
This patch merges duplicate code to cleanup ACPI memory access
implementations. No functional changes.
Signed-off-by: Lv Zheng <lv.zheng@...el.com>
Tested-by: Fei Yang <fei.yang@...el.com>
---
drivers/acpi/mem.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/mem.c b/drivers/acpi/mem.c
index defd317..ba74086 100644
--- a/drivers/acpi/mem.c
+++ b/drivers/acpi/mem.c
@@ -260,7 +260,6 @@ EXPORT_SYMBOL(acpi_os_map_generic_address);
void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
{
u64 addr;
- struct acpi_ioremap *map;
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
return;
@@ -270,16 +269,8 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
if (!addr || !gas->bit_width)
return;
- mutex_lock(&acpi_ioremap_lock);
- map = acpi_map_lookup_phys(addr, gas->bit_width / 8);
- if (!map) {
- mutex_unlock(&acpi_ioremap_lock);
- return;
- }
- acpi_map_put(map);
- mutex_unlock(&acpi_ioremap_lock);
-
- acpi_map_cleanup(map);
+ acpi_os_unmap_iomem((void __iomem *)((unsigned long)addr),
+ gas->bit_width / 8);
}
EXPORT_SYMBOL(acpi_os_unmap_generic_address);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists