diff for duplicates of <20100913203206.GA2601@ericsson.com> diff --git a/a/1.txt b/N1/1.txt index ddc9b49..f654d9f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -42,11 +42,11 @@ You'll see the impact in v3 of the patch. > > * Functions declaration > > @@ -462,17 +466,16 @@ static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr, > > mutex_lock(&data->update_lock); -> > if (data->kind = adt7461) +> > if (data->kind == adt7461) > > data->temp11[nr] = temp_to_u16_adt7461(data, val); -> > - else if (data->kind = max6657 || data->kind = max6680) +> > - else if (data->kind == max6657 || data->kind == max6680) > > - data->temp11[nr] = temp_to_s8(val) << 8; -> > else if (data->kind = max6646) +> > else if (data->kind == max6646) > > data->temp11[nr] = temp_to_u8(val) << 8; > > + else if (!(data->flags & LM90_HAVE_REM_LIMIT_EXT)) > @@ -75,7 +75,7 @@ Not sure about efficiency, but the code looks better that way. Done. > > + if (data->kind != max6657 && data->kind != max6646) > > + data->flags |= LM90_HAVE_OFFSET; > > + -> > + if (data->kind = max6657 || data->kind = max6646) +> > + if (data->kind == max6657 || data->kind == max6646) > > + data->flags |= LM90_HAVE_LOCAL_EXT; > > + > > + if (data->kind != max6657 && data->kind != max6646 @@ -107,36 +107,36 @@ Not sure about efficiency, but the code looks better that way. Done. > > lm90_read_reg(client, LM90_REG_R_REMOTE_CRIT, &data->temp8[3]); > > lm90_read_reg(client, LM90_REG_R_TCRIT_HYST, &data->temp_hyst); > > -> > - if (data->kind = max6657 || data->kind = max6646) { +> > - if (data->kind == max6657 || data->kind == max6646) { > > + if (data->flags & LM90_HAVE_LOCAL_EXT) { > > lm90_read16(client, LM90_REG_R_LOCAL_TEMP, > > MAX6657_REG_R_LOCAL_TEMPL, > > &data->temp11[4]); > > @@ -1033,22 +1047,20 @@ static struct lm90_data *lm90_update_device(struct device *dev) > > -> > if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) = 0) { +> > if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) == 0) { > > data->temp11[1] = h << 8; > > - if (data->kind != max6657 && data->kind != max6680 > > - && data->kind != max6646 > > + if ((data->flags & LM90_HAVE_REM_LIMIT_EXT) > > && lm90_read_reg(client, LM90_REG_R_REMOTE_LOWL, -> > &l) = 0) +> > &l) == 0) > > data->temp11[1] |= l; > > } -> > if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) = 0) { +> > if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) == 0) { > > data->temp11[2] = h << 8; > > - if (data->kind != max6657 && data->kind != max6680 > > - && data->kind != max6646 > > + if ((data->flags & LM90_HAVE_REM_LIMIT_EXT) > > && lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHL, -> > &l) = 0) +> > &l) == 0) > > data->temp11[2] |= l; > > } > > > > - if (data->kind != max6657 && data->kind != max6646) { > > + if (data->flags & LM90_HAVE_OFFSET) { > > if (lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSH, -> > &h) = 0 +> > &h) == 0 > > && lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSL, > > Other than these minor implementation details, the changes look good, I @@ -145,8 +145,3 @@ Not sure about efficiency, but the code looks better that way. Done. As always, excellent feedback. Thanks a lot! Guenter - -_______________________________________________ -lm-sensors mailing list -lm-sensors@lm-sensors.org -http://lists.lm-sensors.org/mailman/listinfo/lm-sensors diff --git a/a/content_digest b/N1/content_digest index 84b7a56..7233ebb 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,8 +2,8 @@ "ref\01284038750-8833-3-git-send-email-guenter.roeck@ericsson.com\0" "ref\020100913213030.3573aab7@hyperion.delvare\0" "From\0Guenter Roeck <guenter.roeck@ericsson.com>\0" - "Subject\0Re: [lm-sensors] [PATCH v2 2/7] hwmon: (lm90) Introduce device\0" - "Date\0Mon, 13 Sep 2010 20:32:06 +0000\0" + "Subject\0Re: [PATCH v2 2/7] hwmon: (lm90) Introduce device feature bits\0" + "Date\0Mon, 13 Sep 2010 13:32:06 -0700\0" "To\0Jean Delvare <khali@linux-fr.org>\0" "Cc\0Andrew Morton <akpm@linux-foundation.org>" lm-sensors@lm-sensors.org <lm-sensors@lm-sensors.org> @@ -55,11 +55,11 @@ "> > * Functions declaration\n" "> > @@ -462,17 +466,16 @@ static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr,\n" "> > \tmutex_lock(&data->update_lock);\n" - "> > \tif (data->kind = adt7461)\n" + "> > \tif (data->kind == adt7461)\n" "> > \t\tdata->temp11[nr] = temp_to_u16_adt7461(data, val);\n" - "> > -\telse if (data->kind = max6657 || data->kind = max6680)\n" + "> > -\telse if (data->kind == max6657 || data->kind == max6680)\n" "> > -\t\tdata->temp11[nr] = temp_to_s8(val) << 8;\n" - "> > \telse if (data->kind = max6646)\n" + "> > \telse if (data->kind == max6646)\n" "> > \t\tdata->temp11[nr] = temp_to_u8(val) << 8;\n" "> > +\telse if (!(data->flags & LM90_HAVE_REM_LIMIT_EXT))\n" "> \n" @@ -88,7 +88,7 @@ "> > +\tif (data->kind != max6657 && data->kind != max6646)\n" "> > +\t\tdata->flags |= LM90_HAVE_OFFSET;\n" "> > +\n" - "> > +\tif (data->kind = max6657 || data->kind = max6646)\n" + "> > +\tif (data->kind == max6657 || data->kind == max6646)\n" "> > +\t\tdata->flags |= LM90_HAVE_LOCAL_EXT;\n" "> > +\n" "> > +\tif (data->kind != max6657 && data->kind != max6646\n" @@ -120,36 +120,36 @@ "> > \t\tlm90_read_reg(client, LM90_REG_R_REMOTE_CRIT, &data->temp8[3]);\n" "> > \t\tlm90_read_reg(client, LM90_REG_R_TCRIT_HYST, &data->temp_hyst);\n" "> > \n" - "> > -\t\tif (data->kind = max6657 || data->kind = max6646) {\n" + "> > -\t\tif (data->kind == max6657 || data->kind == max6646) {\n" "> > +\t\tif (data->flags & LM90_HAVE_LOCAL_EXT) {\n" "> > \t\t\tlm90_read16(client, LM90_REG_R_LOCAL_TEMP,\n" "> > \t\t\t\t MAX6657_REG_R_LOCAL_TEMPL,\n" "> > \t\t\t\t &data->temp11[4]);\n" "> > @@ -1033,22 +1047,20 @@ static struct lm90_data *lm90_update_device(struct device *dev)\n" "> > \n" - "> > \t\tif (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) = 0) {\n" + "> > \t\tif (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) == 0) {\n" "> > \t\t\tdata->temp11[1] = h << 8;\n" "> > -\t\t\tif (data->kind != max6657 && data->kind != max6680\n" "> > -\t\t\t && data->kind != max6646\n" "> > +\t\t\tif ((data->flags & LM90_HAVE_REM_LIMIT_EXT)\n" "> > \t\t\t && lm90_read_reg(client, LM90_REG_R_REMOTE_LOWL,\n" - "> > \t\t\t\t\t &l) = 0)\n" + "> > \t\t\t\t\t &l) == 0)\n" "> > \t\t\t\tdata->temp11[1] |= l;\n" "> > \t\t}\n" - "> > \t\tif (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) = 0) {\n" + "> > \t\tif (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) == 0) {\n" "> > \t\t\tdata->temp11[2] = h << 8;\n" "> > -\t\t\tif (data->kind != max6657 && data->kind != max6680\n" "> > -\t\t\t && data->kind != max6646\n" "> > +\t\t\tif ((data->flags & LM90_HAVE_REM_LIMIT_EXT)\n" "> > \t\t\t && lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHL,\n" - "> > \t\t\t\t\t &l) = 0)\n" + "> > \t\t\t\t\t &l) == 0)\n" "> > \t\t\t\tdata->temp11[2] |= l;\n" "> > \t\t}\n" "> > \n" "> > -\t\tif (data->kind != max6657 && data->kind != max6646) {\n" "> > +\t\tif (data->flags & LM90_HAVE_OFFSET) {\n" "> > \t\t\tif (lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSH,\n" - "> > \t\t\t\t\t &h) = 0\n" + "> > \t\t\t\t\t &h) == 0\n" "> > \t\t\t && lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSL,\n" "> \n" "> Other than these minor implementation details, the changes look good, I\n" @@ -157,11 +157,6 @@ "> \n" "As always, excellent feedback. Thanks a lot!\n" "\n" - "Guenter\n" - "\n" - "_______________________________________________\n" - "lm-sensors mailing list\n" - "lm-sensors@lm-sensors.org\n" - http://lists.lm-sensors.org/mailman/listinfo/lm-sensors + Guenter -e6cff5fafdb7fe92f35ef32b637145ff7e27b45ec466259c85ee4dac1a523975 +3163ba9c068de9a690178183bc7fd591277b267568b3fceeaca6551bb0b1dd6e
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.