diff for duplicates of <10745567584080@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 89e61a6..35158e2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -188,9 +188,9 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + +static u8 FAN_TO_REG(long rpm, int div) +{ -+ if (rpm = -1) ++ if (rpm == -1) + return 0; -+ if (rpm = 0) ++ if (rpm == 0) + return 255; + rpm = SENSORS_LIMIT(rpm, 1, 1000000); + return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); @@ -198,7 +198,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + +static int FAN_FROM_REG(u8 val, int div) +{ -+ return val=0 ? -1 : val=255 ? 0 : 1350000/(val*div); ++ return val==0 ? -1 : val==255 ? 0 : 1350000/(val*div); +} + +/* These constants are a guess, consistent w/ w83781d */ @@ -240,7 +240,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ +static u8 DIV_TO_REG(long val) +{ -+ return val=8 ? 3 : val=4 ? 2 : val=1 ? 0 : 1; ++ return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; +} + +/* For each registered client, we need to keep some data in memory. That @@ -433,7 +433,8 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + break; + } + -+ data->fan_min[nr] + FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); ++ data->fan_min[nr] = ++ FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); + asb100_write_value(client, ASB100_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} @@ -688,7 +689,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + + id = i2c_adapter_id(adapter); + -+ if (force_subclients[0] = id && force_subclients[1] = address) { ++ if (force_subclients[0] == id && force_subclients[1] == address) { + for (i = 2; i <= 3; i++) { + if (force_subclients[i] < 0x48 || + force_subclients[i] > 0x4f) { @@ -710,7 +711,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + data->lm75[1]->addr = 0x48 + ((val >> 4) & 0x07); + } + -+ if(data->lm75[0]->addr = data->lm75[1]->addr) { ++ if(data->lm75[0]->addr == data->lm75[1]->addr) { + dev_err(&new_client->dev, "duplicate addresses 0x%x " + "for subclients\n", data->lm75[0]->addr); + err = -ENODEV; @@ -828,10 +829,10 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + int val1 = asb100_read_value(new_client, ASB100_REG_WCHIPID); + int val2 = asb100_read_value(new_client, ASB100_REG_CHIPMAN); + -+ if ((val1 = 0x31) && (val2 = 0x06)) ++ if ((val1 == 0x31) && (val2 == 0x06)) + kind = asb100; + else { -+ if (kind = 0) ++ if (kind == 0) + dev_warn(&new_client->dev, "ignoring " + "'force' parameter for unknown chip " + "at adapter %d, address 0x%02x.\n", @@ -930,7 +931,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + /* switch banks */ + i2c_smbus_write_byte_data(client, ASB100_REG_BANK, bank); + -+ if (bank = 0 || bank > 2) { ++ if (bank == 0 || bank > 2) { + res = i2c_smbus_read_byte_data(client, reg & 0xff); + } else { + /* switch to subclient */ @@ -975,7 +976,7 @@ diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c + /* switch banks */ + i2c_smbus_write_byte_data(client, ASB100_REG_BANK, bank); + -+ if (bank = 0 || bank > 2) { ++ if (bank == 0 || bank > 2) { + i2c_smbus_write_byte_data(client, reg & 0xff, value & 0xff); + } else { + /* switch to subclient */ diff --git a/a/content_digest b/N1/content_digest index dac3525..debb3b9 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01074556757661@kroah.com\0" - "From\0greg@kroah.com (Greg KH)\0" - "Subject\0[PATCH] i2c driver fixes for 2.6.1\0" - "Date\0Thu, 19 May 2005 06:24:36 +0000\0" + "From\0Greg KH <greg@kroah.com>\0" + "Subject\0Re: [PATCH] i2c driver fixes for 2.6.1\0" + "Date\0Mon, 19 Jan 2004 15:59:18 -0800\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "\00:1\0" @@ -196,9 +196,9 @@ "+\n" "+static u8 FAN_TO_REG(long rpm, int div)\n" "+{\n" - "+\tif (rpm = -1)\n" + "+\tif (rpm == -1)\n" "+\t\treturn 0;\n" - "+\tif (rpm = 0)\n" + "+\tif (rpm == 0)\n" "+\t\treturn 255;\n" "+\trpm = SENSORS_LIMIT(rpm, 1, 1000000);\n" "+\treturn SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254);\n" @@ -206,7 +206,7 @@ "+\n" "+static int FAN_FROM_REG(u8 val, int div)\n" "+{\n" - "+\treturn val=0 ? -1 : val=255 ? 0 : 1350000/(val*div);\n" + "+\treturn val==0 ? -1 : val==255 ? 0 : 1350000/(val*div);\n" "+}\n" "+\n" "+/* These constants are a guess, consistent w/ w83781d */\n" @@ -248,7 +248,7 @@ "+ REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */\n" "+static u8 DIV_TO_REG(long val)\n" "+{\n" - "+\treturn val=8 ? 3 : val=4 ? 2 : val=1 ? 0 : 1;\n" + "+\treturn val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1;\n" "+}\n" "+\n" "+/* For each registered client, we need to keep some data in memory. That\n" @@ -441,7 +441,8 @@ "+\t\tbreak;\n" "+\t}\n" "+\n" - "+\tdata->fan_min[nr] +\t\tFAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));\n" + "+\tdata->fan_min[nr] =\n" + "+\t\tFAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));\n" "+\tasb100_write_value(client, ASB100_REG_FAN_MIN(nr), data->fan_min[nr]);\n" "+\treturn count;\n" "+}\n" @@ -696,7 +697,7 @@ "+\n" "+\tid = i2c_adapter_id(adapter);\n" "+\n" - "+\tif (force_subclients[0] = id && force_subclients[1] = address) {\n" + "+\tif (force_subclients[0] == id && force_subclients[1] == address) {\n" "+\t\tfor (i = 2; i <= 3; i++) {\n" "+\t\t\tif (force_subclients[i] < 0x48 ||\n" "+\t\t\t force_subclients[i] > 0x4f) {\n" @@ -718,7 +719,7 @@ "+\t\tdata->lm75[1]->addr = 0x48 + ((val >> 4) & 0x07);\n" "+\t}\n" "+\n" - "+\tif(data->lm75[0]->addr = data->lm75[1]->addr) {\n" + "+\tif(data->lm75[0]->addr == data->lm75[1]->addr) {\n" "+\t\tdev_err(&new_client->dev, \"duplicate addresses 0x%x \"\n" "+\t\t\t\t\"for subclients\\n\", data->lm75[0]->addr);\n" "+\t\terr = -ENODEV;\n" @@ -836,10 +837,10 @@ "+\t\tint val1 = asb100_read_value(new_client, ASB100_REG_WCHIPID);\n" "+\t\tint val2 = asb100_read_value(new_client, ASB100_REG_CHIPMAN);\n" "+\n" - "+\t\tif ((val1 = 0x31) && (val2 = 0x06))\n" + "+\t\tif ((val1 == 0x31) && (val2 == 0x06))\n" "+\t\t\tkind = asb100;\n" "+\t\telse {\n" - "+\t\t\tif (kind = 0)\n" + "+\t\t\tif (kind == 0)\n" "+\t\t\t\tdev_warn(&new_client->dev, \"ignoring \"\n" "+\t\t\t\t\t\"'force' parameter for unknown chip \"\n" "+\t\t\t\t\t\"at adapter %d, address 0x%02x.\\n\",\n" @@ -938,7 +939,7 @@ "+\t\t/* switch banks */\n" "+\t\ti2c_smbus_write_byte_data(client, ASB100_REG_BANK, bank);\n" "+\n" - "+\tif (bank = 0 || bank > 2) {\n" + "+\tif (bank == 0 || bank > 2) {\n" "+\t\tres = i2c_smbus_read_byte_data(client, reg & 0xff);\n" "+\t} else {\n" "+\t\t/* switch to subclient */\n" @@ -983,7 +984,7 @@ "+\t\t/* switch banks */\n" "+\t\ti2c_smbus_write_byte_data(client, ASB100_REG_BANK, bank);\n" "+\n" - "+\tif (bank = 0 || bank > 2) {\n" + "+\tif (bank == 0 || bank > 2) {\n" "+\t\ti2c_smbus_write_byte_data(client, reg & 0xff, value & 0xff);\n" "+\t} else {\n" "+\t\t/* switch to subclient */\n" @@ -1123,4 +1124,4 @@ " /*\n" * ---- Adapter types ---------------------------------------------------- -311379cf3ce7ff20c807e8a25d16eab9c91296e407fd3bcb1ee0a75171977730 +acc0775124b836ddd2a6c54546f700043429b8c34b0cabd2dd04d66f00f9340b
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.