diff for duplicates of <10793913921925@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 6951612..fa1a0fa 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -211,14 +211,14 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + +#define W83781D_REG_TEMP2_CONFIG 0x152 +#define W83781D_REG_TEMP3_CONFIG 0x252 -+#define W83781D_REG_TEMP(nr) ((nr = 3) ? (0x0250) : \ -+ ((nr = 2) ? (0x0150) : \ ++#define W83781D_REG_TEMP(nr) ((nr == 3) ? (0x0250) : \ ++ ((nr == 2) ? (0x0150) : \ + (0x27))) -+#define W83781D_REG_TEMP_HYST(nr) ((nr = 3) ? (0x253) : \ -+ ((nr = 2) ? (0x153) : \ ++#define W83781D_REG_TEMP_HYST(nr) ((nr == 3) ? (0x253) : \ ++ ((nr == 2) ? (0x153) : \ + (0x3A))) -+#define W83781D_REG_TEMP_OVER(nr) ((nr = 3) ? (0x255) : \ -+ ((nr = 2) ? (0x155) : \ ++#define W83781D_REG_TEMP_OVER(nr) ((nr == 3) ? (0x255) : \ ++ ((nr == 2) ? (0x155) : \ + (0x39))) + +#define W83781D_REG_BANK 0x4E @@ -256,7 +256,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c +static const u8 regpwm_627hf[] = { W83627HF_REG_PWM1, W83627HF_REG_PWM2 }; +static const u8 regpwm[] = { W83627THF_REG_PWM1, W83627THF_REG_PWM2, + W83627THF_REG_PWM3 }; -+#define W836X7HF_REG_PWM(type, nr) (((type) = w83627hf) ? \ ++#define W836X7HF_REG_PWM(type, nr) (((type) == w83627hf) ? \ + regpwm_627hf[(nr) - 1] : regpwm[(nr) - 1]) + +#define W83781D_REG_I2C_ADDR 0x48 @@ -278,7 +278,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.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, @@ -302,7 +302,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + return (s8)reg * 1000; +} + -+#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 PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255)) + @@ -318,7 +318,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + int i; + val = SENSORS_LIMIT(val, 1, 128) >> 1; + for (i = 0; i < 6; i++) { -+ if (val = 0) ++ if (val == 0) + break; + val >>= 1; + } @@ -486,7 +486,8 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + u32 val; + + val = simple_strtoul(buf, NULL, 10); -+ data->fan_min[nr - 1] + FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr - 1])); ++ data->fan_min[nr - 1] = ++ FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr - 1])); + w83627hf_write_value(client, W83781D_REG_FAN_MIN(nr), + data->fan_min[nr - 1]); + @@ -689,7 +690,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + + val = simple_strtoul(buf, NULL, 10); + -+ if (update_mask = BEEP_MASK) { /* We are storing beep_mask */ ++ if (update_mask == BEEP_MASK) { /* We are storing beep_mask */ + data->beep_mask = BEEP_MASK_TO_REG(val); + w83627hf_write_value(client, W83781D_REG_BEEP_INTS1, + data->beep_mask & 0xff); @@ -697,7 +698,8 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + ((data->beep_mask) >> 16) & 0xff); + val2 = (data->beep_mask >> 8) & 0x7f; + } else { /* We are storing beep_enable */ -+ val2 + w83627hf_read_value(client, W83781D_REG_BEEP_INTS2) & 0x7f; ++ val2 = ++ w83627hf_read_value(client, W83781D_REG_BEEP_INTS2) & 0x7f; + data->beep_enable = BEEP_ENABLE_TO_REG(val); + } + @@ -816,7 +818,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + + val = simple_strtoul(buf, NULL, 10); + -+ if (data->type = w83627thf) { ++ if (data->type == w83627thf) { + /* bits 0-3 are reserved in 627THF */ + data->pwm[nr - 1] = PWM_TO_REG(val) & 0xf0; + w83627hf_write_value(client, @@ -961,7 +963,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + val = (superio_inb(WINB_BASE_REG) << 8) | + superio_inb(WINB_BASE_REG + 1); + *address = val & ~(WINB_EXTENT - 1); -+ if (*address = 0 && force_addr = 0) { ++ if (*address == 0 && force_addr == 0) { + superio_exit(); + return -ENODEV; + } @@ -1005,17 +1007,17 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + + superio_enter(); + val= superio_inb(DEVID); -+ if(val = W627_DEVID) ++ if(val == W627_DEVID) + kind = w83627hf; -+ else if(val = W697_DEVID) ++ else if(val == W697_DEVID) + kind = w83697hf; -+ else if(val = W627THF_DEVID) ++ else if(val == W627THF_DEVID) + kind = w83627thf; -+ else if(val = W637_DEVID) ++ else if(val == W637_DEVID) + kind = w83637hf; + + superio_select(W83627HF_LD_HWM); -+ if((val = 0x01 & superio_inb(WINB_ACT_REG)) = 0) ++ if((val = 0x01 & superio_inb(WINB_ACT_REG)) == 0) + superio_outb(WINB_ACT_REG, 1); + superio_exit(); + @@ -1042,13 +1044,13 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + new_client->flags = 0; + + -+ if (kind = w83627hf) { ++ if (kind == w83627hf) { + client_name = "w83627hf"; -+ } else if (kind = w83627thf) { ++ } else if (kind == w83627thf) { + client_name = "w83627thf"; -+ } else if (kind = w83697hf) { ++ } else if (kind == w83697hf) { + client_name = "w83697hf"; -+ } else if (kind = w83637hf) { ++ } else if (kind == w83637hf) { + client_name = "w83637hf"; + } else { + dev_err(&new_client->dev, "Internal error: unknown " @@ -1113,7 +1115,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + + device_create_file_pwm(new_client, 1); + device_create_file_pwm(new_client, 2); -+ if (kind = w83627thf || kind = w83637hf) ++ if (kind == w83627thf || kind == w83637hf) + device_create_file_pwm(new_client, 3); + + device_create_file_sensor(new_client, 1); @@ -1160,11 +1162,11 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + int res, word_sized; + + down(&data->lock); -+ word_sized = (((reg & 0xff00) = 0x100) -+ || ((reg & 0xff00) = 0x200)) -+ && (((reg & 0x00ff) = 0x50) -+ || ((reg & 0x00ff) = 0x53) -+ || ((reg & 0x00ff) = 0x55)); ++ word_sized = (((reg & 0xff00) == 0x100) ++ || ((reg & 0xff00) == 0x200)) ++ && (((reg & 0x00ff) == 0x50) ++ || ((reg & 0x00ff) == 0x53) ++ || ((reg & 0x00ff) == 0x55)); + if (reg & 0xff00) { + outb_p(W83781D_REG_BANK, + client->addr + W83781D_ADDR_REG_OFFSET); @@ -1176,7 +1178,8 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + if (word_sized) { + outb_p((reg & 0xff) + 1, + client->addr + W83781D_ADDR_REG_OFFSET); -+ res + (res << 8) + inb_p(client->addr + ++ res = ++ (res << 8) + inb_p(client->addr + + W83781D_DATA_REG_OFFSET); + } + if (reg & 0xff00) { @@ -1209,10 +1212,10 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + int word_sized; + + down(&data->lock); -+ word_sized = (((reg & 0xff00) = 0x100) -+ || ((reg & 0xff00) = 0x200)) -+ && (((reg & 0x00ff) = 0x53) -+ || ((reg & 0x00ff) = 0x55)); ++ word_sized = (((reg & 0xff00) == 0x100) ++ || ((reg & 0xff00) == 0x200)) ++ && (((reg & 0x00ff) == 0x53) ++ || ((reg & 0x00ff) == 0x55)); + if (reg & 0xff00) { + outb_p(W83781D_REG_BANK, + client->addr + W83781D_ADDR_REG_OFFSET); @@ -1267,11 +1270,11 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + w83627hf_write_value(client, W83781D_REG_I2C_ADDR, force_i2c); + + /* Read VID only once */ -+ if (w83627hf = data->type || w83637hf = data->type) { ++ if (w83627hf == data->type || w83637hf == data->type) { + int lo = w83627hf_read_value(client, W83781D_REG_VID_FANDIV); + int hi = w83627hf_read_value(client, W83781D_REG_CHIPID); + data->vid = (lo & 0x0f) | ((hi & 0x01) << 4); -+ } else if (w83627thf = data->type) { ++ } else if (w83627thf == data->type) { + data->vid = w83627thf_read_gpio5(client) & 0x1f; + } + @@ -1292,7 +1295,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + else + data->sens[i - 1] = 2; + } -+ if ((type = w83697hf) && (i = 2)) ++ if ((type == w83697hf) && (i == 2)) + break; + } + @@ -1301,7 +1304,7 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + data->pwmenable[2] = 1; + + if(init) { -+ if (type = w83627hf) { ++ if (type == w83627hf) { + /* enable PWM2 control (can't hurt since PWM reg + should have been reset to 0xff) */ + w83627hf_write_value(client, W83627HF_REG_PWMCLK12, @@ -1333,43 +1336,56 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + (jiffies < data->last_updated) || !data->valid) { + for (i = 0; i <= 8; i++) { + /* skip missing sensors */ -+ if (((data->type = w83697hf) && (i = 1)) || -+ ((data->type = w83627thf || data->type = w83637hf) -+ && (i = 4 || i = 5))) ++ if (((data->type == w83697hf) && (i == 1)) || ++ ((data->type == w83627thf || data->type == w83637hf) ++ && (i == 4 || i == 5))) + continue; -+ data->in[i] + w83627hf_read_value(client, W83781D_REG_IN(i)); -+ data->in_min[i] + w83627hf_read_value(client, ++ data->in[i] = ++ w83627hf_read_value(client, W83781D_REG_IN(i)); ++ data->in_min[i] = ++ w83627hf_read_value(client, + W83781D_REG_IN_MIN(i)); -+ data->in_max[i] + w83627hf_read_value(client, ++ data->in_max[i] = ++ w83627hf_read_value(client, + W83781D_REG_IN_MAX(i)); + } + for (i = 1; i <= 3; i++) { -+ data->fan[i - 1] + w83627hf_read_value(client, W83781D_REG_FAN(i)); -+ data->fan_min[i - 1] + w83627hf_read_value(client, ++ data->fan[i - 1] = ++ w83627hf_read_value(client, W83781D_REG_FAN(i)); ++ data->fan_min[i - 1] = ++ w83627hf_read_value(client, + W83781D_REG_FAN_MIN(i)); + } + for (i = 1; i <= 3; i++) { + u8 tmp = w83627hf_read_value(client, + W836X7HF_REG_PWM(data->type, i)); + /* bits 0-3 are reserved in 627THF */ -+ if (data->type = w83627thf) ++ if (data->type == w83627thf) + tmp &= 0xf0; + data->pwm[i - 1] = tmp; -+ if(i = 2 && -+ (data->type = w83627hf || data->type = w83697hf)) ++ if(i == 2 && ++ (data->type == w83627hf || data->type == w83697hf)) + break; + } + + data->temp = w83627hf_read_value(client, W83781D_REG_TEMP(1)); -+ data->temp_max + w83627hf_read_value(client, W83781D_REG_TEMP_OVER(1)); -+ data->temp_hyst + w83627hf_read_value(client, W83781D_REG_TEMP_HYST(1)); -+ data->temp_add[0] + w83627hf_read_value(client, W83781D_REG_TEMP(2)); -+ data->temp_max_add[0] + w83627hf_read_value(client, W83781D_REG_TEMP_OVER(2)); -+ data->temp_hyst_add[0] + w83627hf_read_value(client, W83781D_REG_TEMP_HYST(2)); ++ data->temp_max = ++ w83627hf_read_value(client, W83781D_REG_TEMP_OVER(1)); ++ data->temp_hyst = ++ w83627hf_read_value(client, W83781D_REG_TEMP_HYST(1)); ++ data->temp_add[0] = ++ w83627hf_read_value(client, W83781D_REG_TEMP(2)); ++ data->temp_max_add[0] = ++ w83627hf_read_value(client, W83781D_REG_TEMP_OVER(2)); ++ data->temp_hyst_add[0] = ++ w83627hf_read_value(client, W83781D_REG_TEMP_HYST(2)); + if (data->type != w83697hf) { -+ data->temp_add[1] + w83627hf_read_value(client, W83781D_REG_TEMP(3)); -+ data->temp_max_add[1] + w83627hf_read_value(client, W83781D_REG_TEMP_OVER(3)); -+ data->temp_hyst_add[1] + w83627hf_read_value(client, W83781D_REG_TEMP_HYST(3)); ++ data->temp_add[1] = ++ w83627hf_read_value(client, W83781D_REG_TEMP(3)); ++ data->temp_max_add[1] = ++ w83627hf_read_value(client, W83781D_REG_TEMP_OVER(3)); ++ data->temp_hyst_add[1] = ++ w83627hf_read_value(client, W83781D_REG_TEMP_HYST(3)); + } + + i = w83627hf_read_value(client, W83781D_REG_VID_FANDIV); @@ -1384,7 +1400,8 @@ diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c + data->fan_div[1] |= (i >> 4) & 0x04; + if (data->type != w83697hf) + data->fan_div[2] |= (i >> 5) & 0x04; -+ data->alarms + w83627hf_read_value(client, W83781D_REG_ALARM1) | ++ data->alarms = ++ w83627hf_read_value(client, W83781D_REG_ALARM1) | + (w83627hf_read_value(client, W83781D_REG_ALARM2) << 8) | + (w83627hf_read_value(client, W83781D_REG_ALARM3) << 16); + i = w83627hf_read_value(client, W83781D_REG_BEEP_INTS2); diff --git a/a/content_digest b/N1/content_digest index c59bb55..de373c5 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,7 @@ "ref\010793913922046@kroah.com\0" - "ref\010793913903814@kroah.com\0" - "From\0greg@kroah.com (Greg KH)\0" - "Subject\0[PATCH] i2c driver fixes for 2.6.4\0" - "Date\0Thu, 19 May 2005 06:24:47 +0000\0" + "From\0Greg KH <greg@kroah.com>\0" + "Subject\0Re: [PATCH] i2c driver fixes for 2.6.4\0" + "Date\0Mon, 15 Mar 2004 14:56:32 -0800\0" "To\0linux-kernel@vger.kernel.org" " sensors@stimpy.netroedge.com\0" "\00:1\0" @@ -220,14 +219,14 @@ "+\n" "+#define W83781D_REG_TEMP2_CONFIG 0x152\n" "+#define W83781D_REG_TEMP3_CONFIG 0x252\n" - "+#define W83781D_REG_TEMP(nr)\t\t((nr = 3) ? (0x0250) : \\\n" - "+\t\t\t\t\t((nr = 2) ? (0x0150) : \\\n" + "+#define W83781D_REG_TEMP(nr)\t\t((nr == 3) ? (0x0250) : \\\n" + "+\t\t\t\t\t((nr == 2) ? (0x0150) : \\\n" "+\t\t\t\t\t (0x27)))\n" - "+#define W83781D_REG_TEMP_HYST(nr)\t((nr = 3) ? (0x253) : \\\n" - "+\t\t\t\t\t((nr = 2) ? (0x153) : \\\n" + "+#define W83781D_REG_TEMP_HYST(nr)\t((nr == 3) ? (0x253) : \\\n" + "+\t\t\t\t\t((nr == 2) ? (0x153) : \\\n" "+\t\t\t\t\t (0x3A)))\n" - "+#define W83781D_REG_TEMP_OVER(nr)\t((nr = 3) ? (0x255) : \\\n" - "+\t\t\t\t\t((nr = 2) ? (0x155) : \\\n" + "+#define W83781D_REG_TEMP_OVER(nr)\t((nr == 3) ? (0x255) : \\\n" + "+\t\t\t\t\t((nr == 2) ? (0x155) : \\\n" "+\t\t\t\t\t (0x39)))\n" "+\n" "+#define W83781D_REG_BANK 0x4E\n" @@ -265,7 +264,7 @@ "+static const u8 regpwm_627hf[] = { W83627HF_REG_PWM1, W83627HF_REG_PWM2 };\n" "+static const u8 regpwm[] = { W83627THF_REG_PWM1, W83627THF_REG_PWM2,\n" "+ W83627THF_REG_PWM3 };\n" - "+#define W836X7HF_REG_PWM(type, nr) (((type) = w83627hf) ? \\\n" + "+#define W836X7HF_REG_PWM(type, nr) (((type) == w83627hf) ? \\\n" "+ regpwm_627hf[(nr) - 1] : regpwm[(nr) - 1])\n" "+\n" "+#define W83781D_REG_I2C_ADDR 0x48\n" @@ -287,7 +286,7 @@ "+\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" @@ -311,7 +310,7 @@ "+ return (s8)reg * 1000;\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 PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255))\n" "+\n" @@ -327,7 +326,7 @@ "+\tint i;\n" "+\tval = SENSORS_LIMIT(val, 1, 128) >> 1;\n" "+\tfor (i = 0; i < 6; i++) {\n" - "+\t\tif (val = 0)\n" + "+\t\tif (val == 0)\n" "+\t\t\tbreak;\n" "+\t\tval >>= 1;\n" "+\t}\n" @@ -495,7 +494,8 @@ "+\tu32 val;\n" "+\n" "+\tval = simple_strtoul(buf, NULL, 10);\n" - "+\tdata->fan_min[nr - 1] +\t FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr - 1]));\n" + "+\tdata->fan_min[nr - 1] =\n" + "+\t FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr - 1]));\n" "+\tw83627hf_write_value(client, W83781D_REG_FAN_MIN(nr),\n" "+\t\t\t data->fan_min[nr - 1]);\n" "+\n" @@ -698,7 +698,7 @@ "+\n" "+\tval = simple_strtoul(buf, NULL, 10);\n" "+\n" - "+\tif (update_mask = BEEP_MASK) {\t/* We are storing beep_mask */\n" + "+\tif (update_mask == BEEP_MASK) {\t/* We are storing beep_mask */\n" "+\t\tdata->beep_mask = BEEP_MASK_TO_REG(val);\n" "+\t\tw83627hf_write_value(client, W83781D_REG_BEEP_INTS1,\n" "+\t\t\t\t data->beep_mask & 0xff);\n" @@ -706,7 +706,8 @@ "+\t\t\t\t ((data->beep_mask) >> 16) & 0xff);\n" "+\t\tval2 = (data->beep_mask >> 8) & 0x7f;\n" "+\t} else {\t\t/* We are storing beep_enable */\n" - "+\t\tval2 +\t\t w83627hf_read_value(client, W83781D_REG_BEEP_INTS2) & 0x7f;\n" + "+\t\tval2 =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_BEEP_INTS2) & 0x7f;\n" "+\t\tdata->beep_enable = BEEP_ENABLE_TO_REG(val);\n" "+\t}\n" "+\n" @@ -825,7 +826,7 @@ "+\n" "+\tval = simple_strtoul(buf, NULL, 10);\n" "+\n" - "+\tif (data->type = w83627thf) {\n" + "+\tif (data->type == w83627thf) {\n" "+\t\t/* bits 0-3 are reserved in 627THF */\n" "+\t\tdata->pwm[nr - 1] = PWM_TO_REG(val) & 0xf0;\n" "+\t\tw83627hf_write_value(client,\n" @@ -970,7 +971,7 @@ "+\tval = (superio_inb(WINB_BASE_REG) << 8) |\n" "+\t superio_inb(WINB_BASE_REG + 1);\n" "+\t*address = val & ~(WINB_EXTENT - 1);\n" - "+\tif (*address = 0 && force_addr = 0) {\n" + "+\tif (*address == 0 && force_addr == 0) {\n" "+\t\tsuperio_exit();\n" "+\t\treturn -ENODEV;\n" "+\t}\n" @@ -1014,17 +1015,17 @@ "+\n" "+\tsuperio_enter();\n" "+\tval= superio_inb(DEVID);\n" - "+\tif(val = W627_DEVID)\n" + "+\tif(val == W627_DEVID)\n" "+\t\tkind = w83627hf;\n" - "+\telse if(val = W697_DEVID)\n" + "+\telse if(val == W697_DEVID)\n" "+\t\tkind = w83697hf;\n" - "+\telse if(val = W627THF_DEVID)\n" + "+\telse if(val == W627THF_DEVID)\n" "+\t\tkind = w83627thf;\n" - "+\telse if(val = W637_DEVID)\n" + "+\telse if(val == W637_DEVID)\n" "+\t\tkind = w83637hf;\n" "+\n" "+\tsuperio_select(W83627HF_LD_HWM);\n" - "+\tif((val = 0x01 & superio_inb(WINB_ACT_REG)) = 0)\n" + "+\tif((val = 0x01 & superio_inb(WINB_ACT_REG)) == 0)\n" "+\t\tsuperio_outb(WINB_ACT_REG, 1);\n" "+\tsuperio_exit();\n" "+\n" @@ -1051,13 +1052,13 @@ "+\tnew_client->flags = 0;\n" "+\n" "+\n" - "+\tif (kind = w83627hf) {\n" + "+\tif (kind == w83627hf) {\n" "+\t\tclient_name = \"w83627hf\";\n" - "+\t} else if (kind = w83627thf) {\n" + "+\t} else if (kind == w83627thf) {\n" "+\t\tclient_name = \"w83627thf\";\n" - "+\t} else if (kind = w83697hf) {\n" + "+\t} else if (kind == w83697hf) {\n" "+\t\tclient_name = \"w83697hf\";\n" - "+\t} else if (kind = w83637hf) {\n" + "+\t} else if (kind == w83637hf) {\n" "+\t\tclient_name = \"w83637hf\";\n" "+\t} else {\n" "+\t\tdev_err(&new_client->dev, \"Internal error: unknown \"\n" @@ -1122,7 +1123,7 @@ "+\n" "+\tdevice_create_file_pwm(new_client, 1);\n" "+\tdevice_create_file_pwm(new_client, 2);\n" - "+\tif (kind = w83627thf || kind = w83637hf)\n" + "+\tif (kind == w83627thf || kind == w83637hf)\n" "+\t\tdevice_create_file_pwm(new_client, 3);\n" "+\n" "+\tdevice_create_file_sensor(new_client, 1);\n" @@ -1169,11 +1170,11 @@ "+\tint res, word_sized;\n" "+\n" "+\tdown(&data->lock);\n" - "+\tword_sized = (((reg & 0xff00) = 0x100)\n" - "+\t\t || ((reg & 0xff00) = 0x200))\n" - "+\t\t && (((reg & 0x00ff) = 0x50)\n" - "+\t\t || ((reg & 0x00ff) = 0x53)\n" - "+\t\t || ((reg & 0x00ff) = 0x55));\n" + "+\tword_sized = (((reg & 0xff00) == 0x100)\n" + "+\t\t || ((reg & 0xff00) == 0x200))\n" + "+\t\t && (((reg & 0x00ff) == 0x50)\n" + "+\t\t || ((reg & 0x00ff) == 0x53)\n" + "+\t\t || ((reg & 0x00ff) == 0x55));\n" "+\tif (reg & 0xff00) {\n" "+\t\toutb_p(W83781D_REG_BANK,\n" "+\t\t client->addr + W83781D_ADDR_REG_OFFSET);\n" @@ -1185,7 +1186,8 @@ "+\tif (word_sized) {\n" "+\t\toutb_p((reg & 0xff) + 1,\n" "+\t\t client->addr + W83781D_ADDR_REG_OFFSET);\n" - "+\t\tres +\t\t (res << 8) + inb_p(client->addr +\n" + "+\t\tres =\n" + "+\t\t (res << 8) + inb_p(client->addr +\n" "+\t\t\t\t W83781D_DATA_REG_OFFSET);\n" "+\t}\n" "+\tif (reg & 0xff00) {\n" @@ -1218,10 +1220,10 @@ "+\tint word_sized;\n" "+\n" "+\tdown(&data->lock);\n" - "+\tword_sized = (((reg & 0xff00) = 0x100)\n" - "+\t\t || ((reg & 0xff00) = 0x200))\n" - "+\t\t && (((reg & 0x00ff) = 0x53)\n" - "+\t\t || ((reg & 0x00ff) = 0x55));\n" + "+\tword_sized = (((reg & 0xff00) == 0x100)\n" + "+\t\t || ((reg & 0xff00) == 0x200))\n" + "+\t\t && (((reg & 0x00ff) == 0x53)\n" + "+\t\t || ((reg & 0x00ff) == 0x55));\n" "+\tif (reg & 0xff00) {\n" "+\t\toutb_p(W83781D_REG_BANK,\n" "+\t\t client->addr + W83781D_ADDR_REG_OFFSET);\n" @@ -1276,11 +1278,11 @@ "+\tw83627hf_write_value(client, W83781D_REG_I2C_ADDR, force_i2c);\n" "+\n" "+\t/* Read VID only once */\n" - "+\tif (w83627hf = data->type || w83637hf = data->type) {\n" + "+\tif (w83627hf == data->type || w83637hf == data->type) {\n" "+\t\tint lo = w83627hf_read_value(client, W83781D_REG_VID_FANDIV);\n" "+\t\tint hi = w83627hf_read_value(client, W83781D_REG_CHIPID);\n" "+\t\tdata->vid = (lo & 0x0f) | ((hi & 0x01) << 4);\n" - "+\t} else if (w83627thf = data->type) {\n" + "+\t} else if (w83627thf == data->type) {\n" "+\t\tdata->vid = w83627thf_read_gpio5(client) & 0x1f;\n" "+\t}\n" "+\n" @@ -1301,7 +1303,7 @@ "+\t\t\telse\n" "+\t\t\t\tdata->sens[i - 1] = 2;\n" "+\t\t}\n" - "+\t\tif ((type = w83697hf) && (i = 2))\n" + "+\t\tif ((type == w83697hf) && (i == 2))\n" "+\t\t\tbreak;\n" "+\t}\n" "+\n" @@ -1310,7 +1312,7 @@ "+\tdata->pwmenable[2] = 1;\n" "+\n" "+\tif(init) {\n" - "+\t\tif (type = w83627hf) {\n" + "+\t\tif (type == w83627hf) {\n" "+\t\t\t/* enable PWM2 control (can't hurt since PWM reg\n" "+\t\t should have been reset to 0xff) */\n" "+\t\t\tw83627hf_write_value(client, W83627HF_REG_PWMCLK12,\n" @@ -1342,43 +1344,56 @@ "+\t (jiffies < data->last_updated) || !data->valid) {\n" "+\t\tfor (i = 0; i <= 8; i++) {\n" "+\t\t\t/* skip missing sensors */\n" - "+\t\t\tif (((data->type = w83697hf) && (i = 1)) ||\n" - "+\t\t\t ((data->type = w83627thf || data->type = w83637hf)\n" - "+\t\t\t && (i = 4 || i = 5)))\n" + "+\t\t\tif (((data->type == w83697hf) && (i == 1)) ||\n" + "+\t\t\t ((data->type == w83627thf || data->type == w83637hf)\n" + "+\t\t\t && (i == 4 || i == 5)))\n" "+\t\t\t\tcontinue;\n" - "+\t\t\tdata->in[i] +\t\t\t w83627hf_read_value(client, W83781D_REG_IN(i));\n" - "+\t\t\tdata->in_min[i] +\t\t\t w83627hf_read_value(client,\n" + "+\t\t\tdata->in[i] =\n" + "+\t\t\t w83627hf_read_value(client, W83781D_REG_IN(i));\n" + "+\t\t\tdata->in_min[i] =\n" + "+\t\t\t w83627hf_read_value(client,\n" "+\t\t\t\t\t W83781D_REG_IN_MIN(i));\n" - "+\t\t\tdata->in_max[i] +\t\t\t w83627hf_read_value(client,\n" + "+\t\t\tdata->in_max[i] =\n" + "+\t\t\t w83627hf_read_value(client,\n" "+\t\t\t\t\t W83781D_REG_IN_MAX(i));\n" "+\t\t}\n" "+\t\tfor (i = 1; i <= 3; i++) {\n" - "+\t\t\tdata->fan[i - 1] +\t\t\t w83627hf_read_value(client, W83781D_REG_FAN(i));\n" - "+\t\t\tdata->fan_min[i - 1] +\t\t\t w83627hf_read_value(client,\n" + "+\t\t\tdata->fan[i - 1] =\n" + "+\t\t\t w83627hf_read_value(client, W83781D_REG_FAN(i));\n" + "+\t\t\tdata->fan_min[i - 1] =\n" + "+\t\t\t w83627hf_read_value(client,\n" "+\t\t\t\t\t W83781D_REG_FAN_MIN(i));\n" "+\t\t}\n" "+\t\tfor (i = 1; i <= 3; i++) {\n" "+\t\t\tu8 tmp = w83627hf_read_value(client,\n" "+\t\t\t\tW836X7HF_REG_PWM(data->type, i));\n" "+ \t\t\t/* bits 0-3 are reserved in 627THF */\n" - "+ \t\t\tif (data->type = w83627thf)\n" + "+ \t\t\tif (data->type == w83627thf)\n" "+\t\t\t\ttmp &= 0xf0;\n" "+\t\t\tdata->pwm[i - 1] = tmp;\n" - "+\t\t\tif(i = 2 &&\n" - "+\t\t\t (data->type = w83627hf || data->type = w83697hf))\n" + "+\t\t\tif(i == 2 &&\n" + "+\t\t\t (data->type == w83627hf || data->type == w83697hf))\n" "+\t\t\t\tbreak;\n" "+\t\t}\n" "+\n" "+\t\tdata->temp = w83627hf_read_value(client, W83781D_REG_TEMP(1));\n" - "+\t\tdata->temp_max +\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(1));\n" - "+\t\tdata->temp_hyst +\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(1));\n" - "+\t\tdata->temp_add[0] +\t\t w83627hf_read_value(client, W83781D_REG_TEMP(2));\n" - "+\t\tdata->temp_max_add[0] +\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(2));\n" - "+\t\tdata->temp_hyst_add[0] +\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(2));\n" + "+\t\tdata->temp_max =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(1));\n" + "+\t\tdata->temp_hyst =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(1));\n" + "+\t\tdata->temp_add[0] =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_TEMP(2));\n" + "+\t\tdata->temp_max_add[0] =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(2));\n" + "+\t\tdata->temp_hyst_add[0] =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(2));\n" "+\t\tif (data->type != w83697hf) {\n" - "+\t\t\tdata->temp_add[1] +\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP(3));\n" - "+\t\t\tdata->temp_max_add[1] +\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(3));\n" - "+\t\t\tdata->temp_hyst_add[1] +\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(3));\n" + "+\t\t\tdata->temp_add[1] =\n" + "+\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP(3));\n" + "+\t\t\tdata->temp_max_add[1] =\n" + "+\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP_OVER(3));\n" + "+\t\t\tdata->temp_hyst_add[1] =\n" + "+\t\t\t w83627hf_read_value(client, W83781D_REG_TEMP_HYST(3));\n" "+\t\t}\n" "+\n" "+\t\ti = w83627hf_read_value(client, W83781D_REG_VID_FANDIV);\n" @@ -1393,7 +1408,8 @@ "+\t\tdata->fan_div[1] |= (i >> 4) & 0x04;\n" "+\t\tif (data->type != w83697hf)\n" "+\t\t\tdata->fan_div[2] |= (i >> 5) & 0x04;\n" - "+\t\tdata->alarms +\t\t w83627hf_read_value(client, W83781D_REG_ALARM1) |\n" + "+\t\tdata->alarms =\n" + "+\t\t w83627hf_read_value(client, W83781D_REG_ALARM1) |\n" "+\t\t (w83627hf_read_value(client, W83781D_REG_ALARM2) << 8) |\n" "+\t\t (w83627hf_read_value(client, W83781D_REG_ALARM3) << 16);\n" "+\t\ti = w83627hf_read_value(client, W83781D_REG_BEEP_INTS2);\n" @@ -1434,4 +1450,4 @@ "+module_init(sensors_w83627hf_init);\n" +module_exit(sensors_w83627hf_exit); -c3f924ae479d7bc50ea4d0b33d8c95400d4d139b348a9d4d22ce0429997c9330 +2a1f2fbcd05d71254f1a47836dbf09dad1fd2ad887791601d9cc9cfbc7bd7e8f
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.