All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20110208152815.GA13436@ericsson.com>

diff --git a/a/1.txt b/N1/1.txt
index c02903d..372d504 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -24,7 +24,7 @@ Comments inline.
 > + * adapted accordingly.
 >   */
 >  
->  #define FAN_FROM_REG(reg)	((reg) = 0xFFFC || (reg) = 0 ? 0 : \
+>  #define FAN_FROM_REG(reg)	((reg) == 0xFFFC || (reg) == 0 ? 0 : \
 > @@ -180,6 +183,7 @@ struct lm63_data {
 >  			   2: remote high limit */
 >  	u8 temp2_crit_hyst;
@@ -132,24 +132,19 @@ Any idea why the remote critical limit can not be set ?
 >  	mutex_init(&data->update_lock);
 >  
 > +	chip_id = i2c_smbus_read_byte_data(new_client, LM63_REG_CHIP_ID);
-> +	data->is_lm64 = (chip_id = 0x51);
+> +	data->is_lm64 = (chip_id == 0x51);
 > +
 
 Chip id is already detected in lm63_detect. You don't need to detect it again.
 The more common approach would be something along the line of
 	data->kind = id->driver_data;
     You would then use
-	if (data->kind = lm64)
+	if (data->kind == lm64)
     throughout the code. In addition to that, you could define
 	data->kind = id->driver_data;
-	if (data->kind = lm64)
+	if (data->kind == lm64)
 		data->offset = 16000;
     which would save you the repeated recalculation of offset as mentioned before.
 
 Thanks,
 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 3fd0a3d..1513e7a 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,7 +1,7 @@
  "ref\01297170966-13101-1-git-send-email-eibach@gdsys.de\0"
  "From\0Guenter Roeck <guenter.roeck@ericsson.com>\0"
- "Subject\0Re: [lm-sensors] [PATCH] hwmon: Consider LM64 temperature offset\0"
- "Date\0Tue, 08 Feb 2011 15:28:15 +0000\0"
+ "Subject\0Re: [PATCH] hwmon: Consider LM64 temperature offset\0"
+ "Date\0Tue, 8 Feb 2011 07:28:15 -0800\0"
  "To\0Dirk Eibach <eibach@gdsys.de>\0"
  "Cc\0linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>"
   khali@linux-fr.org <khali@linux-fr.org>
@@ -34,7 +34,7 @@
  "> + * adapted accordingly.\n"
  ">   */\n"
  ">  \n"
- ">  #define FAN_FROM_REG(reg)\t((reg) = 0xFFFC || (reg) = 0 ? 0 : \\\n"
+ ">  #define FAN_FROM_REG(reg)\t((reg) == 0xFFFC || (reg) == 0 ? 0 : \\\n"
  "> @@ -180,6 +183,7 @@ struct lm63_data {\n"
  ">  \t\t\t   2: remote high limit */\n"
  ">  \tu8 temp2_crit_hyst;\n"
@@ -142,26 +142,21 @@
  ">  \tmutex_init(&data->update_lock);\n"
  ">  \n"
  "> +\tchip_id = i2c_smbus_read_byte_data(new_client, LM63_REG_CHIP_ID);\n"
- "> +\tdata->is_lm64 = (chip_id = 0x51);\n"
+ "> +\tdata->is_lm64 = (chip_id == 0x51);\n"
  "> +\n"
  "\n"
  "Chip id is already detected in lm63_detect. You don't need to detect it again.\n"
  "The more common approach would be something along the line of\n"
  "\tdata->kind = id->driver_data;\n"
  "    You would then use\n"
- "\tif (data->kind = lm64)\n"
+ "\tif (data->kind == lm64)\n"
  "    throughout the code. In addition to that, you could define\n"
  "\tdata->kind = id->driver_data;\n"
- "\tif (data->kind = lm64)\n"
+ "\tif (data->kind == lm64)\n"
  "\t\tdata->offset = 16000;\n"
  "    which would save you the repeated recalculation of offset as mentioned before.\n"
  "\n"
  "Thanks,\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
 
-3d9f62909da82d20f0f2684960ce6f6968aa85553a4eb6cca9c4407a66ad05b8
+1de89d22178381e2a1934f501b89ab98e2be87bbd12c162abc1a6dbd7d1f6111

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.