diff for duplicates of <10476033191486@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 2ccdec1..a8d4649 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -203,7 +203,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + unsigned char temp; + + /* First check whether we can access PCI at all */ -+ if (pci_present() = 0) { ++ if (pci_present() == 0) { + printk(KERN_WARNING "i2c-i801.o: Error: No PCI-bus found!\n"); + error_return = -ENODEV; + goto END; @@ -222,13 +222,13 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + num++; + } while (*num != 0); + -+ if (I801_dev = NULL) { ++ if (I801_dev == NULL) { + printk + (KERN_WARNING "i2c-i801.o: Error: Can't detect I801, function 3!\n"); + error_return = -ENODEV; + goto END; + } -+ isich4 = *num = PCI_DEVICE_ID_INTEL_82801DB_SMBUS; ++ isich4 = *num == PCI_DEVICE_ID_INTEL_82801DB_SMBUS; + +/* Determine the address of the SMBus areas */ + if (force_addr) { @@ -236,7 +236,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } else { + pci_read_config_word(I801_dev, SMBBA, &i801_smba); + i801_smba &= 0xfff0; -+ if(i801_smba = 0) { ++ if(i801_smba == 0) { + printk(KERN_ERR "i2c-i801.o: SMB base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"); + return -ENODEV; + } @@ -262,7 +262,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + printk + (KERN_WARNING "i2c-i801.o: WARNING: I801 SMBus interface set to new " + "address %04x!\n", i801_smba); -+ } else if ((temp & 1) = 0) { ++ } else if ((temp & 1) == 0) { + pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1); + printk(KERN_WARNING "i2c-i801.o: enabling SMBus device\n"); + } @@ -394,8 +394,8 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + int timeout; + unsigned char hostc, errmask; + -+ if (command = I2C_SMBUS_I2C_BLOCK_DATA) { -+ if (read_write = I2C_SMBUS_WRITE) { ++ if (command == I2C_SMBUS_I2C_BLOCK_DATA) { ++ if (read_write == I2C_SMBUS_WRITE) { + /* set I2C_EN bit in configuration register */ + pci_read_config_byte(I801_dev, SMBHSTCFG, &hostc); + pci_write_config_byte(I801_dev, SMBHSTCFG, @@ -407,7 +407,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } + } + -+ if (read_write = I2C_SMBUS_WRITE) { ++ if (read_write == I2C_SMBUS_WRITE) { + len = data->block[0]; + if (len < 1) + len = 1; @@ -424,12 +424,12 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } + + for (i = 1; i <= len; i++) { -+ if (i = len && read_write = I2C_SMBUS_READ) ++ if (i == len && read_write == I2C_SMBUS_READ) + smbcmd = I801_BLOCK_LAST; + else + smbcmd = I801_BLOCK_DATA; +#if 0 /* now using HW PEC */ -+ if(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC) ++ if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) + smbcmd |= I801_PEC_EN; +#endif + outb_p(smbcmd | ENABLE_INT9, SMBHSTCNT); @@ -444,7 +444,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + + /* Make sure the SMBus host is ready to start transmitting */ + temp = inb_p(SMBHSTSTS); -+ if (i = 1) { ++ if (i == 1) { + /* Erronenous conditions before transaction: + * Byte_Done, Failed, Bus_Err, Dev_Err, Intr, Host_Busy */ + errmask=0x9f; @@ -473,10 +473,10 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } + } + -+ if (i = 1) { ++ if (i == 1) { +#if 0 /* #ifdef HAVE_PEC (now using HW PEC) */ -+ if(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC) { -+ if(read_write = I2C_SMBUS_WRITE) ++ if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) { ++ if(read_write == I2C_SMBUS_WRITE) + outb_p(data->block[len + 1], SMBPEC); + } +#endif @@ -516,7 +516,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c +#endif + } + -+ if (i = 1 && read_write = I2C_SMBUS_READ) { ++ if (i == 1 && read_write == I2C_SMBUS_READ) { + len = inb_p(SMBHSTDAT0); + if (len < 1) + len = 1; @@ -526,9 +526,9 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } + + /* Retrieve/store value in SMBBLKDAT */ -+ if (read_write = I2C_SMBUS_READ) ++ if (read_write == I2C_SMBUS_READ) + data->block[i] = inb_p(SMBBLKDAT); -+ if (read_write = I2C_SMBUS_WRITE && i+1 <= len) ++ if (read_write == I2C_SMBUS_WRITE && i+1 <= len) + outb_p(data->block[i+1], SMBBLKDAT); + if ((temp & 0x9e) != 0x00) + outb_p(temp, SMBHSTSTS); /* signals SMBBLKDAT ready */ @@ -551,7 +551,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + } + +#ifdef HAVE_PEC -+ if(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC) { ++ if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) { + /* wait for INTR bit as advised by Intel */ + timeout = 0; + do { @@ -564,7 +564,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + printk(KERN_DEBUG "i2c-i801.o: PEC Timeout!\n"); + } +#if 0 /* now using HW PEC */ -+ if(read_write = I2C_SMBUS_READ) { ++ if(read_write == I2C_SMBUS_READ) { + data->block[len + 1] = inb_p(SMBPEC); + } +#endif @@ -573,7 +573,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c +#endif + result = 0; +END: -+ if (command = I2C_SMBUS_I2C_BLOCK_DATA) { ++ if (command == I2C_SMBUS_I2C_BLOCK_DATA) { + /* restore saved configuration register value */ + pci_write_config_byte(I801_dev, SMBHSTCFG, hostc); + } @@ -603,7 +603,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + case I2C_SMBUS_BYTE: + outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), + SMBHSTADD); -+ if (read_write = I2C_SMBUS_WRITE) ++ if (read_write == I2C_SMBUS_WRITE) + outb_p(command, SMBHSTCMD); + xact = I801_BYTE; + break; @@ -611,7 +611,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), + SMBHSTADD); + outb_p(command, SMBHSTCMD); -+ if (read_write = I2C_SMBUS_WRITE) ++ if (read_write == I2C_SMBUS_WRITE) + outb_p(data->byte, SMBHSTDAT0); + xact = I801_BYTE_DATA; + break; @@ -619,7 +619,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), + SMBHSTADD); + outb_p(command, SMBHSTCMD); -+ if (read_write = I2C_SMBUS_WRITE) { ++ if (read_write == I2C_SMBUS_WRITE) { + outb_p(data->word & 0xff, SMBHSTDAT0); + outb_p((data->word & 0xff00) >> 8, SMBHSTDAT1); + } @@ -629,7 +629,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + case I2C_SMBUS_I2C_BLOCK_DATA: +#ifdef HAVE_PEC + case I2C_SMBUS_BLOCK_DATA_PEC: -+ if(hwpec && size = I2C_SMBUS_BLOCK_DATA) ++ if(hwpec && size == I2C_SMBUS_BLOCK_DATA) + size = I2C_SMBUS_BLOCK_DATA_PEC; +#endif + outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), @@ -669,7 +669,7 @@ diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c + return ret; + if(ret) + return -1; -+ if ((read_write = I2C_SMBUS_WRITE) || (xact = I801_QUICK)) ++ if ((read_write == I2C_SMBUS_WRITE) || (xact == I801_QUICK)) + return 0; + + switch (xact & 0x7f) { diff --git a/a/content_digest b/N1/content_digest index 52ab775..b74a07f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,7 @@ "ref\01047603318248@kroah.com\0" - "ref\010476033213315@kroah.com\0" - "From\0greg@kroah.com (Greg KH)\0" - "Subject\0[PATCH] i2c driver changes for 2.5.64\0" - "Date\0Thu, 19 May 2005 06:23:50 +0000\0" + "From\0Greg KH <greg@kroah.com>\0" + "Subject\0Re: [PATCH] i2c driver changes for 2.5.64\0" + "Date\0Thu, 13 Mar 2003 16:55 -0800\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "\00:1\0" @@ -212,7 +211,7 @@ "+\tunsigned char temp;\n" "+\n" "+\t/* First check whether we can access PCI at all */\n" - "+\tif (pci_present() = 0) {\n" + "+\tif (pci_present() == 0) {\n" "+\t\tprintk(KERN_WARNING \"i2c-i801.o: Error: No PCI-bus found!\\n\");\n" "+\t\terror_return = -ENODEV;\n" "+\t\tgoto END;\n" @@ -231,13 +230,13 @@ "+\t\tnum++;\n" "+\t} while (*num != 0);\n" "+\n" - "+\tif (I801_dev = NULL) {\n" + "+\tif (I801_dev == NULL) {\n" "+\t\tprintk\n" "+\t\t (KERN_WARNING \"i2c-i801.o: Error: Can't detect I801, function 3!\\n\");\n" "+\t\terror_return = -ENODEV;\n" "+\t\tgoto END;\n" "+\t}\n" - "+\tisich4 = *num = PCI_DEVICE_ID_INTEL_82801DB_SMBUS;\n" + "+\tisich4 = *num == PCI_DEVICE_ID_INTEL_82801DB_SMBUS;\n" "+\n" "+/* Determine the address of the SMBus areas */\n" "+\tif (force_addr) {\n" @@ -245,7 +244,7 @@ "+\t} else {\n" "+\t\tpci_read_config_word(I801_dev, SMBBA, &i801_smba);\n" "+\t\ti801_smba &= 0xfff0;\n" - "+\t\tif(i801_smba = 0) {\n" + "+\t\tif(i801_smba == 0) {\n" "+\t\t\tprintk(KERN_ERR \"i2c-i801.o: SMB base address uninitialized - upgrade BIOS or use force_addr=0xaddr\\n\");\n" "+\t\t\treturn -ENODEV;\n" "+\t\t}\n" @@ -271,7 +270,7 @@ "+\t\tprintk\n" "+\t\t (KERN_WARNING \"i2c-i801.o: WARNING: I801 SMBus interface set to new \"\n" "+\t\t \"address %04x!\\n\", i801_smba);\n" - "+\t} else if ((temp & 1) = 0) {\n" + "+\t} else if ((temp & 1) == 0) {\n" "+\t\tpci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1);\n" "+\t\tprintk(KERN_WARNING \"i2c-i801.o: enabling SMBus device\\n\");\n" "+\t}\n" @@ -403,8 +402,8 @@ "+\tint timeout;\n" "+ unsigned char hostc, errmask;\n" "+\n" - "+ if (command = I2C_SMBUS_I2C_BLOCK_DATA) {\n" - "+ if (read_write = I2C_SMBUS_WRITE) {\n" + "+ if (command == I2C_SMBUS_I2C_BLOCK_DATA) {\n" + "+ if (read_write == I2C_SMBUS_WRITE) {\n" "+ /* set I2C_EN bit in configuration register */\n" "+ pci_read_config_byte(I801_dev, SMBHSTCFG, &hostc);\n" "+ pci_write_config_byte(I801_dev, SMBHSTCFG, \n" @@ -416,7 +415,7 @@ "+ }\n" "+ }\n" "+\n" - "+\tif (read_write = I2C_SMBUS_WRITE) {\n" + "+\tif (read_write == I2C_SMBUS_WRITE) {\n" "+\t\tlen = data->block[0];\n" "+\t\tif (len < 1)\n" "+\t\t\tlen = 1;\n" @@ -433,12 +432,12 @@ "+\t}\n" "+\n" "+\tfor (i = 1; i <= len; i++) {\n" - "+\t\tif (i = len && read_write = I2C_SMBUS_READ)\n" + "+\t\tif (i == len && read_write == I2C_SMBUS_READ)\n" "+\t\t\tsmbcmd = I801_BLOCK_LAST;\n" "+\t\telse\n" "+\t\t\tsmbcmd = I801_BLOCK_DATA;\n" "+#if 0 /* now using HW PEC */\n" - "+\t\tif(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC)\n" + "+\t\tif(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC)\n" "+\t\t\tsmbcmd |= I801_PEC_EN;\n" "+#endif\n" "+\t\toutb_p(smbcmd | ENABLE_INT9, SMBHSTCNT);\n" @@ -453,7 +452,7 @@ "+\n" "+\t\t/* Make sure the SMBus host is ready to start transmitting */\n" "+\t\ttemp = inb_p(SMBHSTSTS);\n" - "+ if (i = 1) {\n" + "+ if (i == 1) {\n" "+ /* Erronenous conditions before transaction: \n" "+ * Byte_Done, Failed, Bus_Err, Dev_Err, Intr, Host_Busy */\n" "+ errmask=0x9f; \n" @@ -482,10 +481,10 @@ "+ }\n" "+\t\t}\n" "+\n" - "+\t\tif (i = 1) {\n" + "+\t\tif (i == 1) {\n" "+#if 0 /* #ifdef HAVE_PEC (now using HW PEC) */\n" - "+\t\t\tif(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC) {\n" - "+\t\t\t\tif(read_write = I2C_SMBUS_WRITE)\n" + "+\t\t\tif(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) {\n" + "+\t\t\t\tif(read_write == I2C_SMBUS_WRITE)\n" "+\t\t\t\t\toutb_p(data->block[len + 1], SMBPEC);\n" "+\t\t\t}\n" "+#endif\n" @@ -525,7 +524,7 @@ "+#endif\n" "+\t\t}\n" "+\n" - "+\t\tif (i = 1 && read_write = I2C_SMBUS_READ) {\n" + "+\t\tif (i == 1 && read_write == I2C_SMBUS_READ) {\n" "+\t\t\tlen = inb_p(SMBHSTDAT0);\n" "+\t\t\tif (len < 1)\n" "+\t\t\t\tlen = 1;\n" @@ -535,9 +534,9 @@ "+\t\t}\n" "+\n" "+ /* Retrieve/store value in SMBBLKDAT */\n" - "+\t\tif (read_write = I2C_SMBUS_READ)\n" + "+\t\tif (read_write == I2C_SMBUS_READ)\n" "+\t\t\tdata->block[i] = inb_p(SMBBLKDAT);\n" - "+\t\tif (read_write = I2C_SMBUS_WRITE && i+1 <= len)\n" + "+\t\tif (read_write == I2C_SMBUS_WRITE && i+1 <= len)\n" "+\t\t\toutb_p(data->block[i+1], SMBBLKDAT);\n" "+\t\tif ((temp & 0x9e) != 0x00)\n" "+\t\t\toutb_p(temp, SMBHSTSTS); /* signals SMBBLKDAT ready */\n" @@ -560,7 +559,7 @@ "+\t}\n" "+\n" "+#ifdef HAVE_PEC\n" - "+\tif(isich4 && command = I2C_SMBUS_BLOCK_DATA_PEC) {\n" + "+\tif(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) {\n" "+\t\t/* wait for INTR bit as advised by Intel */\n" "+\t\ttimeout = 0;\n" "+\t\tdo {\n" @@ -573,7 +572,7 @@ "+\t\t\tprintk(KERN_DEBUG \"i2c-i801.o: PEC Timeout!\\n\");\n" "+\t\t}\n" "+#if 0 /* now using HW PEC */\n" - "+\t\tif(read_write = I2C_SMBUS_READ) {\n" + "+\t\tif(read_write == I2C_SMBUS_READ) {\n" "+\t\t\tdata->block[len + 1] = inb_p(SMBPEC);\n" "+\t\t}\n" "+#endif\n" @@ -582,7 +581,7 @@ "+#endif\n" "+ result = 0;\n" "+END:\n" - "+ if (command = I2C_SMBUS_I2C_BLOCK_DATA) {\n" + "+ if (command == I2C_SMBUS_I2C_BLOCK_DATA) {\n" "+ /* restore saved configuration register value */\n" "+\t\tpci_write_config_byte(I801_dev, SMBHSTCFG, hostc);\n" "+ }\n" @@ -612,7 +611,7 @@ "+\tcase I2C_SMBUS_BYTE:\n" "+\t\toutb_p(((addr & 0x7f) << 1) | (read_write & 0x01),\n" "+\t\t SMBHSTADD);\n" - "+\t\tif (read_write = I2C_SMBUS_WRITE)\n" + "+\t\tif (read_write == I2C_SMBUS_WRITE)\n" "+\t\t\toutb_p(command, SMBHSTCMD);\n" "+\t\txact = I801_BYTE;\n" "+\t\tbreak;\n" @@ -620,7 +619,7 @@ "+\t\toutb_p(((addr & 0x7f) << 1) | (read_write & 0x01),\n" "+\t\t SMBHSTADD);\n" "+\t\toutb_p(command, SMBHSTCMD);\n" - "+\t\tif (read_write = I2C_SMBUS_WRITE)\n" + "+\t\tif (read_write == I2C_SMBUS_WRITE)\n" "+\t\t\toutb_p(data->byte, SMBHSTDAT0);\n" "+\t\txact = I801_BYTE_DATA;\n" "+\t\tbreak;\n" @@ -628,7 +627,7 @@ "+\t\toutb_p(((addr & 0x7f) << 1) | (read_write & 0x01),\n" "+\t\t SMBHSTADD);\n" "+\t\toutb_p(command, SMBHSTCMD);\n" - "+\t\tif (read_write = I2C_SMBUS_WRITE) {\n" + "+\t\tif (read_write == I2C_SMBUS_WRITE) {\n" "+\t\t\toutb_p(data->word & 0xff, SMBHSTDAT0);\n" "+\t\t\toutb_p((data->word & 0xff00) >> 8, SMBHSTDAT1);\n" "+\t\t}\n" @@ -638,7 +637,7 @@ "+\tcase I2C_SMBUS_I2C_BLOCK_DATA:\n" "+#ifdef HAVE_PEC\n" "+\tcase I2C_SMBUS_BLOCK_DATA_PEC:\n" - "+\t\tif(hwpec && size = I2C_SMBUS_BLOCK_DATA)\n" + "+\t\tif(hwpec && size == I2C_SMBUS_BLOCK_DATA)\n" "+\t\t\tsize = I2C_SMBUS_BLOCK_DATA_PEC;\n" "+#endif\n" "+\t\toutb_p(((addr & 0x7f) << 1) | (read_write & 0x01),\n" @@ -678,7 +677,7 @@ "+\t\treturn ret;\n" "+\tif(ret)\n" "+\t\treturn -1;\n" - "+\tif ((read_write = I2C_SMBUS_WRITE) || (xact = I801_QUICK))\n" + "+\tif ((read_write == I2C_SMBUS_WRITE) || (xact == I801_QUICK))\n" "+\t\treturn 0;\n" "+\n" "+\tswitch (xact & 0x7f) {\n" @@ -775,4 +774,4 @@ "+module_init(i2c_i801_init);\n" +module_exit(i2c_i801_exit); -0a3de6cc6742fd6cb05c50bf6da72eca3d26b7f88435e5c7bc0ecc2c1325424e +209063fa4c3157a173d63a43d2a3fb652f97129baa69da109dc7df6208d2835f
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.