Skip to contentSkip to conversation

hwmon (dme1737): skip detection if forced

PATCH In review Juerg Haefliger 2 participants 2 messages Apr 23, 2008 – Apr 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 hwmon (dme1737): skip detection if forced

Skip the checking of the device ID register in the hwmon register block if the force_id option is used.

Signed-off-by Juerg Haefliger <juergh at gmail.com>

Skip the checking of the device ID register in the hwmon register block if the force_id option is used.

Signed-off-by Juerg Haefliger <juergh at gmail.com>
drivers/hwmon/dme1737.c +10 -7
Index: linux/drivers/hwmon/dme1737.c
===================================================================
@@ -2360,13 +2360,16 @@
 	client->addr = res->start;
 	platform_set_drvdata(pdev, data);
 
-	company = dme1737_read(client, DME1737_REG_COMPANY);
-	device = dme1737_read(client, DME1737_REG_DEVICE);
-
-	if (!((company == DME1737_COMPANY_SMSC) &&
-	      (device == SCH311X_DEVICE))) {
-		err = -ENODEV;
-		goto exit_kfree;
+	/* Skip chip detection if module is loaded with force_id parameter */
+	if (!force_id) {
+		company = dme1737_read(client, DME1737_REG_COMPANY);
+		device = dme1737_read(client, DME1737_REG_DEVICE);
+
+		if (!((company == DME1737_COMPANY_SMSC) &&
+		      (device == SCH311X_DEVICE))) {
+			err = -ENODEV;
+			goto exit_kfree;
+		}
 	}
 	data->type = -1;
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

Acked-by on v1 2/3
#1 lore raw

Re: [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if

Quoted 4 lines · Juerg Haefliger

Skip the checking of the device ID register in the hwmon register block if the force_id option is used.

Signed-off-by Juerg Haefliger <juergh at gmail.com>

Of course, otherwise the force_id parameter just can't work. Good catch.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors