diff for duplicates of <10512287461373@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 609f4d8..0834ba3 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -168,11 +168,11 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + return (u8) + SENSORS_LIMIT(((val * 210240 - 13300) / 250 + 5) / 1000, + 0, 255); -+ else if (inNum = 2) ++ else if (inNum == 2) + return (u8) + SENSORS_LIMIT(((val * 157370 - 13300) / 250 + 5) / 1000, + 0, 255); -+ else if (inNum = 3) ++ else if (inNum == 3) + return (u8) + SENSORS_LIMIT(((val * 101080 - 13300) / 250 + 5) / 1000, + 0, 255); @@ -189,9 +189,9 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + We need to scale with *100 anyway, so no need to /100 at the end. */ + if (inNum <= 1) + return (long) (((250000 * val + 13300) / 210240 * 10 + 5) /10); -+ else if (inNum = 2) ++ else if (inNum == 2) + return (long) (((250000 * val + 13300) / 157370 * 10 + 5) /10); -+ else if (inNum = 3) ++ else if (inNum == 3) + return (long) (((250000 * val + 13300) / 101080 * 10 + 5) /10); + else + return (long) (((250000 * val + 13300) / 41714 * 10 + 5) /10); @@ -199,24 +199,24 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + +static inline u8 FAN_TO_REG(long rpm, int div) +{ -+ 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); +} + -+#define FAN_FROM_REG(val,div) ((val)=0?-1:(val)=255?0:1350000/((val)*(div))) ++#define FAN_FROM_REG(val,div) ((val)==0?-1:(val)==255?0:1350000/((val)*(div))) + +#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-5)/10):\ + ((val)+5)/10),0,255)) +#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*10) + -+#define VID_FROM_REG(val) ((val)=0x1f?0:(val)>=0x10?510-(val)*10:\ ++#define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\ + 205-(val)*5) +#define ALARMS_FROM_REG(val) (val) + -+#define DIV_TO_REG(val) ((val)=8?3:(val)=4?2:(val)=1?0:1) ++#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) +#define DIV_FROM_REG(val) (1 << (val)) + +/* Initial limits. Use the config file to set better limits. */ @@ -660,17 +660,18 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + if (it87_read_value(new_client, IT87_REG_CONFIG) & 0x80) + goto ERROR1; + if (!is_isa -+ && (it87_read_value(new_client, IT87_REG_I2C_ADDR) !+ address)) goto ERROR1; ++ && (it87_read_value(new_client, IT87_REG_I2C_ADDR) != ++ address)) goto ERROR1; + } + + /* Determine the chip type. */ + if (kind <= 0) { + i = it87_read_value(new_client, IT87_REG_CHIPID); -+ if (i = 0x90) { ++ if (i == 0x90) { + kind = it87; + } + else { -+ if (kind = 0) ++ if (kind == 0) + printk + ("it87.o: Ignoring 'force' parameter for unknown chip at " + "adapter %d, address 0x%02x\n", @@ -679,10 +680,10 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + } + } + -+ if (kind = it87) { ++ if (kind == it87) { + name = "it87"; + client_name = "IT87 chip"; -+ } /* else if (kind = it8712) { ++ } /* else if (kind == it8712) { + name = "it8712"; + client_name = "IT87-J chip"; + } */ else { @@ -908,28 +909,37 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + it87_read_value(client, IT87_REG_CONFIG) | 0x40); + } + for (i = 0; i <= 7; i++) { -+ data->in[i] + it87_read_value(client, IT87_REG_VIN(i)); -+ data->in_min[i] + it87_read_value(client, IT87_REG_VIN_MIN(i)); -+ data->in_max[i] + it87_read_value(client, IT87_REG_VIN_MAX(i)); ++ data->in[i] = ++ it87_read_value(client, IT87_REG_VIN(i)); ++ data->in_min[i] = ++ it87_read_value(client, IT87_REG_VIN_MIN(i)); ++ data->in_max[i] = ++ it87_read_value(client, IT87_REG_VIN_MAX(i)); + } -+ data->in[8] + it87_read_value(client, IT87_REG_VIN(8)); ++ data->in[8] = ++ it87_read_value(client, IT87_REG_VIN(8)); + /* Temperature sensor doesn't have limit registers, set + to min and max value */ + data->in_min[8] = 0; + data->in_max[8] = 255; + + for (i = 1; i <= 3; i++) { -+ data->fan[i - 1] + it87_read_value(client, IT87_REG_FAN(i)); -+ data->fan_min[i - 1] + it87_read_value(client, IT87_REG_FAN_MIN(i)); ++ data->fan[i - 1] = ++ it87_read_value(client, IT87_REG_FAN(i)); ++ data->fan_min[i - 1] = ++ it87_read_value(client, IT87_REG_FAN_MIN(i)); + } + for (i = 1; i <= 3; i++) { -+ data->temp[i - 1] + it87_read_value(client, IT87_REG_TEMP(i)); -+ data->temp_high[i - 1] + it87_read_value(client, IT87_REG_TEMP_HIGH(i)); -+ data->temp_low[i - 1] + it87_read_value(client, IT87_REG_TEMP_LOW(i)); ++ data->temp[i - 1] = ++ it87_read_value(client, IT87_REG_TEMP(i)); ++ data->temp_high[i - 1] = ++ it87_read_value(client, IT87_REG_TEMP_HIGH(i)); ++ data->temp_low[i - 1] = ++ it87_read_value(client, IT87_REG_TEMP_LOW(i)); + } + + /* The 8705 does not have VID capability */ -+ /*if (data->type = it8712) { ++ /*if (data->type == it8712) { + data->vid = it87_read_value(client, IT87_REG_VID); + data->vid &= 0x1f; + } @@ -942,7 +952,8 @@ diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c + data->fan_div[1] = (i >> 3) & 0x07; + data->fan_div[2] = 1; + -+ data->alarms + it87_read_value(client, IT87_REG_ALARM1) | ++ data->alarms = ++ it87_read_value(client, IT87_REG_ALARM1) | + (it87_read_value(client, IT87_REG_ALARM2) << 8) | + (it87_read_value(client, IT87_REG_ALARM3) << 16); + diff --git a/a/content_digest b/N1/content_digest index b1a8e00..1d9d0de 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\010512287463196@kroah.com\0" - "From\0greg@kroah.com (Greg KH)\0" - "Subject\0[PATCH] i2c driver changes for 2.5.68\0" - "Date\0Thu, 19 May 2005 06:23:54 +0000\0" + "From\0Greg KH <greg@kroah.com>\0" + "Subject\0Re: [PATCH] i2c driver changes for 2.5.68\0" + "Date\0Thu, 24 Apr 2003 16:59:06 -0700\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "\00:1\0" @@ -176,11 +176,11 @@ "+\t\treturn (u8)\n" "+\t\t SENSORS_LIMIT(((val * 210240 - 13300) / 250 + 5) / 1000, \n" "+\t\t\t\t 0, 255);\n" - "+\telse if (inNum = 2)\n" + "+\telse if (inNum == 2)\n" "+\t\treturn (u8)\n" "+\t\t SENSORS_LIMIT(((val * 157370 - 13300) / 250 + 5) / 1000, \n" "+\t\t\t\t 0, 255);\n" - "+\telse if (inNum = 3)\n" + "+\telse if (inNum == 3)\n" "+\t\treturn (u8)\n" "+\t\t SENSORS_LIMIT(((val * 101080 - 13300) / 250 + 5) / 1000, \n" "+\t\t\t\t 0, 255);\n" @@ -197,9 +197,9 @@ "+\t We need to scale with *100 anyway, so no need to /100 at the end. */\n" "+\tif (inNum <= 1)\n" "+\t\treturn (long) (((250000 * val + 13300) / 210240 * 10 + 5) /10);\n" - "+\telse if (inNum = 2)\n" + "+\telse if (inNum == 2)\n" "+\t\treturn (long) (((250000 * val + 13300) / 157370 * 10 + 5) /10);\n" - "+\telse if (inNum = 3)\n" + "+\telse if (inNum == 3)\n" "+\t\treturn (long) (((250000 * val + 13300) / 101080 * 10 + 5) /10);\n" "+\telse\n" "+\t\treturn (long) (((250000 * val + 13300) / 41714 * 10 + 5) /10);\n" @@ -207,24 +207,24 @@ "+\n" "+static inline u8 FAN_TO_REG(long rpm, int div)\n" "+{\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,\n" "+\t\t\t 254);\n" "+}\n" "+\n" - "+#define FAN_FROM_REG(val,div) ((val)=0?-1:(val)=255?0:1350000/((val)*(div)))\n" + "+#define FAN_FROM_REG(val,div) ((val)==0?-1:(val)==255?0:1350000/((val)*(div)))\n" "+\n" "+#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-5)/10):\\\n" "+\t\t\t\t\t((val)+5)/10),0,255))\n" "+#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*10)\n" "+\n" - "+#define VID_FROM_REG(val) ((val)=0x1f?0:(val)>=0x10?510-(val)*10:\\\n" + "+#define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\\\n" "+\t\t\t\t205-(val)*5)\n" "+#define ALARMS_FROM_REG(val) (val)\n" "+\n" - "+#define DIV_TO_REG(val) ((val)=8?3:(val)=4?2:(val)=1?0:1)\n" + "+#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1)\n" "+#define DIV_FROM_REG(val) (1 << (val))\n" "+\n" "+/* Initial limits. Use the config file to set better limits. */\n" @@ -668,17 +668,18 @@ "+\t\tif (it87_read_value(new_client, IT87_REG_CONFIG) & 0x80)\n" "+\t\t\tgoto ERROR1;\n" "+\t\tif (!is_isa\n" - "+\t\t\t&& (it87_read_value(new_client, IT87_REG_I2C_ADDR) !+\t\t\taddress)) goto ERROR1;\n" + "+\t\t\t&& (it87_read_value(new_client, IT87_REG_I2C_ADDR) !=\n" + "+\t\t\taddress)) goto ERROR1;\n" "+\t}\n" "+\n" "+\t/* Determine the chip type. */\n" "+\tif (kind <= 0) {\n" "+\t\ti = it87_read_value(new_client, IT87_REG_CHIPID);\n" - "+\t\tif (i = 0x90) {\n" + "+\t\tif (i == 0x90) {\n" "+\t\t\tkind = it87;\n" "+\t\t}\n" "+\t\telse {\n" - "+\t\t\tif (kind = 0)\n" + "+\t\t\tif (kind == 0)\n" "+\t\t\t\tprintk\n" "+\t\t\t\t (\"it87.o: Ignoring 'force' parameter for unknown chip at \"\n" "+\t\t\t\t \"adapter %d, address 0x%02x\\n\",\n" @@ -687,10 +688,10 @@ "+\t\t}\n" "+\t}\n" "+\n" - "+\tif (kind = it87) {\n" + "+\tif (kind == it87) {\n" "+\t\tname = \"it87\";\n" "+\t\tclient_name = \"IT87 chip\";\n" - "+\t} /* else if (kind = it8712) {\n" + "+\t} /* else if (kind == it8712) {\n" "+\t\tname = \"it8712\";\n" "+\t\tclient_name = \"IT87-J chip\";\n" "+\t} */ else {\n" @@ -916,28 +917,37 @@ "+\t\t\t it87_read_value(client, IT87_REG_CONFIG) | 0x40);\n" "+\t\t}\n" "+\t\tfor (i = 0; i <= 7; i++) {\n" - "+\t\t\tdata->in[i] +\t\t\t it87_read_value(client, IT87_REG_VIN(i));\n" - "+\t\t\tdata->in_min[i] +\t\t\t it87_read_value(client, IT87_REG_VIN_MIN(i));\n" - "+\t\t\tdata->in_max[i] +\t\t\t it87_read_value(client, IT87_REG_VIN_MAX(i));\n" + "+\t\t\tdata->in[i] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_VIN(i));\n" + "+\t\t\tdata->in_min[i] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_VIN_MIN(i));\n" + "+\t\t\tdata->in_max[i] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_VIN_MAX(i));\n" "+\t\t}\n" - "+\t\tdata->in[8] +\t\t it87_read_value(client, IT87_REG_VIN(8));\n" + "+\t\tdata->in[8] =\n" + "+\t\t it87_read_value(client, IT87_REG_VIN(8));\n" "+\t\t/* Temperature sensor doesn't have limit registers, set\n" "+\t\t to min and max value */\n" "+\t\tdata->in_min[8] = 0;\n" "+\t\tdata->in_max[8] = 255;\n" "+\n" "+\t\tfor (i = 1; i <= 3; i++) {\n" - "+\t\t\tdata->fan[i - 1] +\t\t\t it87_read_value(client, IT87_REG_FAN(i));\n" - "+\t\t\tdata->fan_min[i - 1] +\t\t\t it87_read_value(client, IT87_REG_FAN_MIN(i));\n" + "+\t\t\tdata->fan[i - 1] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_FAN(i));\n" + "+\t\t\tdata->fan_min[i - 1] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_FAN_MIN(i));\n" "+\t\t}\n" "+\t\tfor (i = 1; i <= 3; i++) {\n" - "+\t\t\tdata->temp[i - 1] +\t\t\t it87_read_value(client, IT87_REG_TEMP(i));\n" - "+\t\t\tdata->temp_high[i - 1] +\t\t\t it87_read_value(client, IT87_REG_TEMP_HIGH(i));\n" - "+\t\t\tdata->temp_low[i - 1] +\t\t\t it87_read_value(client, IT87_REG_TEMP_LOW(i));\n" + "+\t\t\tdata->temp[i - 1] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_TEMP(i));\n" + "+\t\t\tdata->temp_high[i - 1] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_TEMP_HIGH(i));\n" + "+\t\t\tdata->temp_low[i - 1] =\n" + "+\t\t\t it87_read_value(client, IT87_REG_TEMP_LOW(i));\n" "+\t\t}\n" "+\n" "+\t\t/* The 8705 does not have VID capability */\n" - "+\t\t/*if (data->type = it8712) {\n" + "+\t\t/*if (data->type == it8712) {\n" "+\t\t\tdata->vid = it87_read_value(client, IT87_REG_VID);\n" "+\t\t\tdata->vid &= 0x1f;\n" "+\t\t}\n" @@ -950,7 +960,8 @@ "+\t\tdata->fan_div[1] = (i >> 3) & 0x07;\n" "+\t\tdata->fan_div[2] = 1;\n" "+\n" - "+\t\tdata->alarms +\t\t\tit87_read_value(client, IT87_REG_ALARM1) |\n" + "+\t\tdata->alarms =\n" + "+\t\t\tit87_read_value(client, IT87_REG_ALARM1) |\n" "+\t\t\t(it87_read_value(client, IT87_REG_ALARM2) << 8) |\n" "+\t\t\t(it87_read_value(client, IT87_REG_ALARM3) << 16);\n" "+\n" @@ -983,4 +994,4 @@ "+module_init(sm_it87_init);\n" +module_exit(sm_it87_exit); -e7c0987e9be2e6394018529105c8250565d5ed2ec594f6ff2e0af76d0191adff +f143acf33f7af6de12de5d2d0ae61e1d364299e55aa230941093bf837bedb396
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.