Index: /lm-sensors/trunk/kernel/busses/i2c-i801.c
===================================================================
--- /lm-sensors/trunk/kernel/busses/i2c-i801.c	(revision 4278)
+++ /lm-sensors/trunk/kernel/busses/i2c-i801.c	(revision 4625)
@@ -23,8 +23,8 @@
 /*
     SUPPORTED DEVICES	PCI ID
-    82801AA		2413           
-    82801AB		2423           
-    82801BA		2443           
-    82801CA/CAM		2483           
+    82801AA		2413
+    82801AB		2423
+    82801BA		2443
+    82801CA/CAM		2483
     82801DB		24C3   (HW PEC supported, 32 byte buffer not supported)
     82801EB		24D3   (HW PEC supported, 32 byte buffer not supported)
@@ -158,8 +158,4 @@
 		 "EXTREMELY DANGEROUS!");
 
-static int i801_transaction(void);
-static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
-				  int command, int hwpec);
-
 static unsigned short i801_smba;
 static struct pci_driver i801_driver;
@@ -176,5 +172,5 @@
 	    dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 ||
 	    dev->device == PCI_DEVICE_ID_INTEL_ESB_4 ||
-	    dev->device == PCI_DEVICE_ID_INTEL_ESB2_17 ||	
+	    dev->device == PCI_DEVICE_ID_INTEL_ESB2_17 ||
 	    dev->device == PCI_DEVICE_ID_INTEL_ICH6_16 ||
 	    dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 ||
@@ -336,6 +332,6 @@
 		if (len < 1)
 			len = 1;
-		if (len > 32)
-			len = 32;
+		if (len > I2C_SMBUS_BLOCK_MAX)
+			len = I2C_SMBUS_BLOCK_MAX;
 		outb_p(len, SMBHSTDAT0);
 		outb_p(data->block[1], SMBBLKDAT);
@@ -344,13 +340,9 @@
 	}
 
-	if(isich4 && command != I2C_SMBUS_I2C_BLOCK_DATA) {
-		/* set 32 byte buffer */
-	}
-
 	for (i = 1; i <= len; i++) {
 		if (i == len && read_write == I2C_SMBUS_READ)
 			smbcmd = I801_BLOCK_LAST;
 		else if (command == I2C_SMBUS_I2C_BLOCK_DATA &&
-		         read_write == I2C_SMBUS_READ)
+			 read_write == I2C_SMBUS_READ)
 			smbcmd = I801_I2C_BLOCK_DATA;
 		else
@@ -366,11 +358,11 @@
 		temp = inb_p(SMBHSTSTS);
 		if (i == 1) {
-			/* Erronenous conditions before transaction: 
+			/* Erroneous conditions before transaction:
 			 * Byte_Done, Failed, Bus_Err, Dev_Err, Intr, Host_Busy */
-			errmask=0x9f; 
+			errmask = 0x9f;
 		} else {
-			/* Erronenous conditions during transaction: 
+			/* Erroneous conditions during transaction:
 			 * Failed, Bus_Err, Dev_Err, Intr */
-			errmask=0x1e; 
+			errmask = 0x1e;
 		}
 		if (temp & errmask) {
@@ -382,5 +374,5 @@
 					"Reset failed! (%02x)\n", temp);
 				result = -1;
-                                goto END;
+				goto END;
 			}
 			if (i != 1) {
@@ -400,6 +392,6 @@
 			temp = inb_p(SMBHSTSTS);
 		}
-		    while ((!(temp & 0x80))
-			   && (timeout++ < MAX_TIMEOUT));
+		while ((!(temp & 0x80))
+		       && (timeout++ < MAX_TIMEOUT));
 
 		/* If the SMBus is still busy, we give up */
@@ -426,6 +418,6 @@
 				if (len < 1)
 					len = 1;
-				if (len > 32)
-					len = 32;
+				if (len > I2C_SMBUS_BLOCK_MAX)
+					len = I2C_SMBUS_BLOCK_MAX;
 				data->block[0] = len;
 			} else {
@@ -469,5 +461,5 @@
 			dev_dbg(I801_dev, "PEC Timeout!\n");
 		}
-		outb_p(temp, SMBHSTSTS); 
+		outb_p(temp, SMBHSTSTS);
 	}
 	result = 0;
@@ -597,5 +589,5 @@
 #if 0
 	     | (isich5 ? I2C_FUNC_SMBUS_READ_I2C_BLOCK
-	               : 0)
+		       : 0)
 #endif
 	    ;
