patch-2.4.1 linux/drivers/acpi/interpreter/amregion.c

Next file: linux/drivers/acpi/interpreter/amresnte.c
Previous file: linux/drivers/acpi/interpreter/amprep.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/drivers/acpi/interpreter/amregion.c linux/drivers/acpi/interpreter/amregion.c
@@ -2,12 +2,12 @@
 /******************************************************************************
  *
  * Module Name: amregion - ACPI default Op_region (address space) handlers
- *              $Revision: 41 $
+ *              $Revision: 44 $
  *
  *****************************************************************************/
 
 /*
- *  Copyright (C) 2000 R. Byron Moore
+ *  Copyright (C) 2000, 2001 R. Byron Moore
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -99,8 +99,8 @@
 	 */
 
 	if ((address < mem_info->mapped_physical_address) ||
-		((address + length) >
-			(mem_info->mapped_physical_address + mem_info->mapped_length)))
+		(((ACPI_INTEGER) address + length) >
+			((ACPI_INTEGER) mem_info->mapped_physical_address + mem_info->mapped_length)))
 	{
 		/*
 		 * The request cannot be resolved by the current memory mapping;
@@ -139,7 +139,7 @@
 	/* TBD: should these pointers go to 64-bit in all cases ? */
 
 	logical_addr_ptr = mem_info->mapped_logical_address +
-			  (address - mem_info->mapped_physical_address);
+			  ((ACPI_INTEGER) address - (ACPI_INTEGER) mem_info->mapped_physical_address);
 
 	/* Perform the memory read or write */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)