* [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if forced
@ 2008-04-23 5:24 Juerg Haefliger
2008-04-25 6:43 ` [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Juerg Haefliger @ 2008-04-23 5:24 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
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>
[-- Attachment #2: dme1737-skip-detection-if-forced.patch --]
[-- Type: text/x-patch, Size: 1091 bytes --]
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>
Index: linux/drivers/hwmon/dme1737.c
===================================================================
--- linux.orig/drivers/hwmon/dme1737.c 2008-04-22 22:02:45.000000000 -0700
+++ linux/drivers/hwmon/dme1737.c 2008-04-22 22:09:10.000000000 -0700
@@ -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;
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-25 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 5:24 [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if forced Juerg Haefliger
2008-04-25 6:43 ` [lm-sensors] [PATCH 2/3] hwmon (dme1737): skip detection if Jean Delvare
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.