patch-2.4.2 linux/drivers/acpi/interpreter/amfldio.c

Next file: linux/drivers/acpi/interpreter/amstore.c
Previous file: linux/drivers/acpi/include/actypes.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/acpi/interpreter/amfldio.c linux/drivers/acpi/interpreter/amfldio.c
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: amfldio - Aml Field I/O
- *              $Revision: 37 $
+ *              $Revision: 39 $
  *
  *****************************************************************************/
 
@@ -415,7 +415,8 @@
 
 		/* Check if update rule needs to be applied (not if mask is all ones) */
 
-		if (((1 << bit_granularity) -1) & ~mask) {
+		/* The left shift drops the bits we want to ignore. */
+		if ((~mask << (sizeof(mask)*8 - bit_granularity)) != 0) {
 			/*
 			 * Read the current contents of the byte/word/dword containing
 			 * the field, and merge with the new field value.

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